sh/bash/bash-prompt.sh

16 lines
241 B
Bash
Raw Normal View History

2023-05-09 20:02:34 +00:00
PS1="\
\t\
\e[0;31m\${?}\e[0m\
\e[0;32m\u\e[0m\
@ \e[0;33m\h\e[0m\
"
if [ "$(type -t __git_ps1)" == 'function' ] ; then
PS1="${PS1} –\e[0;35m\$(__git_ps1)\e[0m"
fi
PS1="${PS1}
\e[0;36m\${PWD}\e[0m
"
PS2="\
"