From 1ddc7c72e532bbbebf5027b78ce885d496a3fe1f Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Wed, 21 Mar 2001 17:02:35 +0000 Subject: [PATCH] Tweak an expansion. --- ChangeLog | 6 ++++++ Functions/Prompts/prompt_bart_setup | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 50c9e3645..7ce12c349 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2001-03-21 Bart Schaefer + + * unposted: Functions/Prompts/prompt_bart_setup: Use the (S) + flag on a parameter expansion to improve parsing of the PS1 + string when computing its visible length. + 2001-03-20 Sven Wischnowsky * 13674: Completion/User/_telnet: use -l as default for telnet's diff --git a/Functions/Prompts/prompt_bart_setup b/Functions/Prompts/prompt_bart_setup index e8889071d..57a8429a7 100644 --- a/Functions/Prompts/prompt_bart_setup +++ b/Functions/Prompts/prompt_bart_setup @@ -60,7 +60,7 @@ prompt_bart_precmd () { psvar[8]="$history[$[${(%):-%h}-1]]" # Use history text, not just number psvar[9]='' # Padding before upper right prompt - repeat $[COLUMNS-${#${(%%f)${PS1//[%]\{[^%]#%\}/}}[1]}-1] + repeat $[COLUMNS-${#${(%%f)${(S)PS1//[%]\{*%\}/}}[1]}-1] do psvar[9]="$psvar[9] " done