Improve bash prompts and rename tinygit to git
This commit is contained in:
parent
164a78d884
commit
be452c5059
1 changed files with 5 additions and 5 deletions
10
bashrc
10
bashrc
|
@ -39,21 +39,21 @@ rlevel() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
export PS1normal='\[\033[00;34m\]┌─╼ \033[00;31m$(rlevel 🥆)\[\033[01;35m\]\u\[\033[00;34m\]@\[\033[01;35m\]\h \[\033[00;33m\]\$ \[\033[01;35m\]\w \[\033[01;34m\]`find -mindepth 1 -maxdepth 1 -type d | wc -l`\[\033[00;34m\]d \[\033[01;32m\]`find -maxdepth 1 -type f | wc -l`\[\033[00;32m\]f\[\033[00m\] $(gitprompt)
|
export PS1full='\[\033[00;34m\]┌─╼ \033[00;31m$(rlevel 🥆)\[\033[01;35m\]\u\[\033[00;34m\]@\[\033[01;35m\]\h \[\033[00;33m\]\$ \[\033[01;35m\]\w \[\033[01;34m\]`find -mindepth 1 -maxdepth 1 -type d | wc -l`\[\033[00;34m\]d \[\033[01;32m\]`find -maxdepth 1 -type f | wc -l`\[\033[00;32m\]f\[\033[00;34m\] $(gitprompt)
|
||||||
\[\033[00;34m\]└╼ \[\033[00m\]'
|
\[\033[00;34m\]└╼ \[\033[00m\]'
|
||||||
|
|
||||||
export PS1tiny='\[\033[00;37m\]$(dirs +0) \033[00;36m$(rlevel 🥆)\[\033[00;34m\]‣ \[\033[00m\]'
|
export PS1tiny='\[\033[00;37m\]$(dirs +0 | sed -e "s/.*\\(\\(\\/.*\\)\\{2\\}\\)$/…\\1/") \[\033[00;36m\]$(rlevel 🥆)\[\033[00;34m\]‣ \[\033[00m\]'
|
||||||
|
|
||||||
export PS1nogit='\[\033[00;34m\]┌─╼ \033[00;31m$(rlevel)\[\033[01;35m\]\u\[\033[00;34m\]@\[\033[01;35m\]\h \[\033[00;33m\]\$ \[\033[01;35m\]\w \[\033[01;34m\]`find -mindepth 1 -maxdepth 1 -type d | wc -l`\[\033[00;34m\]d \[\033[01;32m\]`find -maxdepth 1 -type f | wc -l`\[\033[00;32m\]f\[\033[00m\]
|
export PS1nogit='\[\033[00;34m\]┌─╼ \033[00;31m$(rlevel)\[\033[01;35m\]\u\[\033[00;34m\]@\[\033[01;35m\]\h \[\033[00;33m\]\$ \[\033[01;35m\]\w \[\033[01;34m\]`find -mindepth 1 -maxdepth 1 -type d | wc -l`\[\033[00;34m\]d \[\033[01;32m\]`find -maxdepth 1 -type f | wc -l`\[\033[00;32m\]f\[\033[00m\]
|
||||||
\[\033[00;34m\]└╼ \[\033[00m\]'
|
\[\033[00;34m\]└╼ \[\033[00m\]'
|
||||||
|
|
||||||
export PS1tinygit='\[\033[00;37m\]$(gitprompt || dirs +0)
|
export PS1git='\[\033[00;36m\]$(rlevel 🥆)\[\033[00;37m\]$(gitprompt || dirs +0) \[\033[00;36m\]$(gitpath)
|
||||||
\[\033[00;34m\]↳ \033[00;36m$(rlevel 🥆)\[\033[00m\]'
|
\[\033[00;34m\]↳ \[\033[00m\]'
|
||||||
|
|
||||||
prompt() {
|
prompt() {
|
||||||
name=PS1$1
|
name=PS1$1
|
||||||
if [ -z $1 ] || [ -z "${!name}" ]; then
|
if [ -z $1 ] || [ -z "${!name}" ]; then
|
||||||
name=PS1normal
|
name=PS1full
|
||||||
fi
|
fi
|
||||||
export PS1set=$1
|
export PS1set=$1
|
||||||
PS1=${!name}
|
PS1=${!name}
|
||||||
|
|
Loading…
Reference in a new issue