Skip to content

Commit

Permalink
vterm
Browse files Browse the repository at this point in the history
  • Loading branch information
EnigmaCurry committed Jul 19, 2023
1 parent a01dbb2 commit f99cb2a
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,22 @@ eval $(keychain --eval --quiet)
alias ls='ls --color=auto'
alias grep='grep --color=auto'
alias bb='rlwrap bb'


vterm_printf() {
if [ -n "$TMUX" ] && ([ "${TERM%%-*}" = "tmux" ] || [ "${TERM%%-*}" = "screen" ]); then
# Tell tmux to pass the escape sequences through
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
}
if [[ "$INSIDE_EMACS" = 'vterm' ]]; then
function clear() {
vterm_printf "51;Evterm-clear-scrollback";
tput clear;
}
fi

0 comments on commit f99cb2a

Please sign in to comment.