diff --git a/shells/shared/aliases b/shells/shared/aliases index 4a4fa02c..f31c6e63 100644 --- a/shells/shared/aliases +++ b/shells/shared/aliases @@ -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' diff --git a/shells/shared/functions b/shells/shared/functions index a0e6cf8f..93004b4f 100644 --- a/shells/shared/functions +++ b/shells/shared/functions @@ -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