about summary refs log tree commit diff stats
path: root/bash/vterm-emacs.bash
blob: 88d3e09d3daa7af2861d02462eca5c53db73dbd8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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" "$*"
}