bundlewrap/bundles/users/files/bashrc
Franziska Kunsmann 2bc659af5f
All checks were successful
bundlewrap/pipeline/head This commit looks good
bundles/users: add some bash aliases
2020-10-23 06:06:59 +02:00

29 lines
713 B
Bash

[ -z "$PS1" ] && return
__node_name="${node.name}"
<%text>
if [[ "$(id -u)" -eq 0 ]]
then
export PS1='\[\e[1;34m\][\[\e[1;32m\]'"$__node_name"'\[\e[1;34m\]][\[\e[1;32m\]\u\[\e[1;34m\]@\[\e[1;32m\]\w\[\e[1;34m\]] $PRODWARNING> \[\e[0m\]'
else
export PS1='\[\e[1;0m\]['"$__node_name"'][\u@\w]\[\e[1;34m\] $PRODWARNING\[\e[1;0m\]> '
fi
case $TERM in
xterm*|rxvt*)
export PROMPT_COMMAND='echo -ne "\a\e]0;'"$__node_name"':${PWD/$HOME/~}\a"'
;;
screen*)
export PROMPT_COMMAND='echo -ne "\a\ek'"$__node_name"':${PWD/$HOME/~}\e\\"'
;;
*)
unset PROMPT_COMMAND
;;
esac
uptime
last | grep 'still logged in'
alias v='vim -p'
alias l='ls -lAh'
</%text>