From 3b58245f8e3ff16de52f30fe3d37b57f92fad822 Mon Sep 17 00:00:00 2001 From: Alexander Barton Date: Sun, 24 Aug 2014 19:26:01 +0200 Subject: [PATCH] PS1 shell prompt: only show current directory name Don't show the full path name any more, because it can become very long and too wide for an 80 character terminal ... --- sys/bashrc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/sys/bashrc b/sys/bashrc index e2f2628..eb4799c 100644 --- a/sys/bashrc +++ b/sys/bashrc @@ -108,17 +108,12 @@ if ! shopt -oq posix; then fi # Shell prompt -PS1_Path() { - P="${PWD/$HOME/~}" - echo "${P/???????????????????????????????*/${P:0:8}...${P: -20}}" -} - PS1="${COLOR_PREPOSTTXT}${PS1_BEGIN:-<}" [ "$LOGNAME" = "root" ] \ || PS1="${PS1}${COLOR_USER}\u${COLOR_AT}@" PS1="${PS1}${COLOR_HOST}\h" PS1="${PS1}${COLOR_COLON}:" -PS1="${PS1}${COLOR_PATH}\$(PS1_Path) " +PS1="${PS1}${COLOR_PATH}\W " PS1="${PS1}${COLOR_HISTORY}\!" PS1="${PS1}${COLOR_PREPOSTTXT}${PS1_END:->}${COLOR_RESET} " [ "$LOGNAME" = "root" ] \ -- 2.39.2