From 90182069d2aa62062161305b111ec868c42059e9 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Wed, 13 Apr 2022 17:09:05 -0500 Subject: Emacs stuff --- bash/vterm-emacs.bash | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 bash/vterm-emacs.bash (limited to 'bash/vterm-emacs.bash') diff --git a/bash/vterm-emacs.bash b/bash/vterm-emacs.bash new file mode 100644 index 0000000..88d3e09 --- /dev/null +++ b/bash/vterm-emacs.bash @@ -0,0 +1,23 @@ +# shell-side configuration for Emacs vterm module +# https://github.com/akermu/emacs-libvterm#shell-side-configuration +# Make sure this is the last file loaded by ~/.bashrc! + +# Load the requisite code from the vterm install directory +if [[ "$INSIDE_EMACS" = 'vterm' ]] \ + && [[ -n ${EMACS_VTERM_PATH} ]] \ + && [[ -f ${EMACS_VTERM_PATH}/etc/emacs-vterm-bash.sh ]]; then + source ${EMACS_VTERM_PATH}/etc/emacs-vterm-bash.sh +fi + +# Extra commands for `vterm-eval-cmds' + +find_file() { + vterm_cmd find-file "$(realpath "${@:-.}")" +} + +say() { + vterm_cmd message "%s" "$*" +} + + + -- cgit 1.4.1-21-gabe81