More bash bits

This commit is contained in:
2020-07-17 08:11:11 +01:00
parent bbdaad41b1
commit 3a2a0985bb
2 changed files with 14 additions and 1 deletions

View File

@@ -5,4 +5,5 @@ else
alias ls="ls -F --color=auto"
fi
alias tma="tmux attach"
alias t='(tmux has-session 2>/dev/null && tmux attach) || (tmux new-session)'
alias tma="tmux attach"

View File

@@ -25,4 +25,16 @@ function add-sshkey() {
echo "No key named ${NAME} found..."
fi
fi
}
# Switch to a simple prompt for demos (thanks Mark H for the idea)
function demoprompt() {
if [ ! -z ${OLDPS1+x} ]; then
PS1=$OLDPS1
unset OLDPS1
else
OLDPS1=$PS1
PS1="\$ "
clear
fi
}