Makes ctrlc work to reset colour schemes in ssh

master
Jonathan Hodgson 5 years ago
parent eb594ac79b
commit 46131a06c3
  1. 2
      shells/shared/aliases
  2. 8
      shells/shared/functions

@ -14,7 +14,7 @@ alias tree='tree -F -C'
# Make qmv open on 1 column mode
alias qmv='qmv -f do'
alias msfconsole="( systemctl status --no-pager postgresql.service > /dev/null || (echo \"Statring postgres\"; sudo systemctl start postgresql.service) ); ( pass show system/metasploit/database.yaml > database.yaml; msfconsole -y database.yaml; rm database.yaml )"
alias msfconsole="( systemctl status --no-pager postgresql.service > /dev/null || (echo \"Statring postgres\"; sudo systemctl start postgresql.service) ); ( pass show system/metasploit/database.yaml > database.yaml; sudo msfconsole -y database.yaml; rm database.yaml )"
#Start cups
alias cups='sudo systemctl start org.cups.cupsd.service'

@ -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

Loading…
Cancel
Save