diff --git a/zsh/vterm.zsh b/zsh/vterm.zsh new file mode 100644 index 0000000..38e4b39 --- /dev/null +++ b/zsh/vterm.zsh @@ -0,0 +1,17 @@ +# +# vterm Integration +# https://github.com/akermu/emacs-libvterm#shell-side-configuration +# + +vterm_printf(){ + if [ -n "$TMUX" ]; then + # Tell tmux to pass the escape sequences through + # (Source: http://permalink.gmane.org/gmane.comp.terminal-emulators.tmux.user/1324) + printf "\ePtmux;\e\e]%s\007\e\\" "$1" + elif [ "${TERM%%-*}" = "screen" ]; then + # GNU screen (screen, screen-256color, screen-256color-bce) + printf "\eP\e]%s\007\e\\" "$1" + else + printf "\e]%s\e\\" "$1" + fi +} diff --git a/zshrc b/zshrc index 94846e3..f78aa6e 100644 --- a/zshrc +++ b/zshrc @@ -102,6 +102,7 @@ source "$DOTZSH/emacs.zsh" source "$DOTZSH/git.zsh" source "$DOTZSH/less.zsh" source "$DOTZSH/tmux.zsh" +source "$DOTZSH/vterm.zsh" # Development source "$DOTZSH/docker.zsh"