fish: Add support functions for vterm

This commit is contained in:
Alex Palaistras 2022-04-01 19:16:28 +01:00
parent b2649726b1
commit defd582b8a
2 changed files with 14 additions and 0 deletions

View File

@ -9,6 +9,9 @@ end
# Set default theme.
source $HOME/.config/fish/themes/boxfish.fish
# Custom function definitions.
source $HOME/.config/fish/functions/*.fish
# Custom aliases.
alias dot 'git --git-dir=$HOME/.dotfiles/ --work-tree=$HOME'

View File

@ -0,0 +1,11 @@
function vterm_printf;
if begin; [ -n "$TMUX" ]; and string match -q -r "screen|tmux" "$TERM"; end
# tell tmux to pass the escape sequences through
printf "\ePtmux;\e\e]%s\007\e\\" "$argv"
else if string match -q -- "screen*" "$TERM"
# GNU screen (screen, screen-256color, screen-256color-bce)
printf "\eP\e]%s\007\e\\" "$argv"
else
printf "\e]%s\e\\" "$argv"
end
end