Makes ctrlc work to reset colour schemes in ssh
This commit is contained in:
parent
6712d84c89
commit
e73c5e298d
2 changed files with 9 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue