Fix extra space before rangerlevel in bash prompt

This commit is contained in:
Talia 2020-01-31 11:18:29 +01:00
parent e41f871697
commit 4c582b3662

8
bashrc
View file

@ -32,17 +32,17 @@ rlevel() {
if [ -n "$RANGER_LEVEL" ] if [ -n "$RANGER_LEVEL" ]
then if [ "$RANGER_LEVEL" = 1 ] then if [ "$RANGER_LEVEL" = 1 ]
then then
/bin/echo -ne "\033[00;31m●" /bin/echo -ne "\033[00;31m● "
else else
/bin/echo -ne "\033[00;31m● $RANGER_LEVEL" /bin/echo -ne "\033[00;31m● $RANGER_LEVEL "
fi fi
fi fi
} }
PS1normal='\[\033[00;34m\]┌─╼ $(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) PS1normal='\[\033[00;34m\]┌─╼ $(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)
\[\033[00;34m\]└╼ \[\033[00m\]' \[\033[00;34m\]└╼ \[\033[00m\]'
PS1nogit='\[\033[00;34m\]┌─╼ $(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\] PS1nogit='\[\033[00;34m\]┌─╼ $(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\]'
PS1=$PS1normal PS1=$PS1normal