From 70e4aa40e675dee6e713eeeac8e3bb8d37e73e4d Mon Sep 17 00:00:00 2001 From: Eric Teunis de Boone Date: Wed, 24 Jul 2024 17:01:36 +0200 Subject: [PATCH] [bash] Do show working directory in STATICPS1 --- bash/bashrc.d/prompt_command.bash | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/bash/bashrc.d/prompt_command.bash b/bash/bashrc.d/prompt_command.bash index a3471ce..5bff5d0 100644 --- a/bash/bashrc.d/prompt_command.bash +++ b/bash/bashrc.d/prompt_command.bash @@ -174,19 +174,21 @@ function __prompt_command() { fi # dir count, pwd - if [ -z "${STATIC_PS1}" ]; then - PS1+=" " - if color ; then - PS1+="${BBlu}" - fi - - PS1+="\[$(ls |wc -l)\]@\W" - - if color ; then - PS1+="${RCol}" - fi - PS1+=" " + PS1+=" " + if color ; then + PS1+="${BBlu}" fi + + if [ -z "${STATIC_PS1}" ]; then + PS1+="\[$(ls |wc -l)\]@" + fi + + PS1+="\W" + + if color ; then + PS1+="${RCol}" + fi + PS1+=" " ## Short prompt if [ -n "${SHORTPS1}" ]; then PS1+="\r\n"