Makes ctrlc work to reset colour schemes in ssh

This commit is contained in:
Jonathan Hodgson 2019-11-11 17:24:47 +00:00
parent 6712d84c89
commit e73c5e298d
2 changed files with 9 additions and 1 deletions

View file

@ -238,10 +238,18 @@ function updatePath(){
}
function reset_colourscheme(){
if [ -L $HOME/.dotfiles/shells/zsh/current-color-scheme ]; then
source $HOME/.dotfiles/shells/zsh/current-color-scheme
fi
exit 2
}
function ssh(){
if [ -L $HOME/.dotfiles/shells/zsh/ssh-color-scheme ]; then
source $HOME/.dotfiles/shells/zsh/ssh-color-scheme
fi
trap "reset_colourscheme" 2
command /usr/bin/ssh "$@"
if [ -L $HOME/.dotfiles/shells/zsh/current-color-scheme ]; then
source $HOME/.dotfiles/shells/zsh/current-color-scheme