diff options
| author | Bart Schaefer <barts@users.sourceforge.net> | 2000-04-08 21:04:47 +0000 |
|---|---|---|
| committer | Bart Schaefer <barts@users.sourceforge.net> | 2000-04-08 21:04:47 +0000 |
| commit | d2ece376a3b50f0ca361d27fb8e55372771532dd (patch) | |
| tree | 5c328d0123f28866e88227db55c893c348932c27 /Functions/Prompts/prompt_bart_setup | |
| parent | stat -o shows file modes in octal (diff) | |
| download | zsh-d2ece376a3b50f0ca361d27fb8e55372771532dd.tar zsh-d2ece376a3b50f0ca361d27fb8e55372771532dd.tar.gz zsh-d2ece376a3b50f0ca361d27fb8e55372771532dd.tar.bz2 zsh-d2ece376a3b50f0ca361d27fb8e55372771532dd.tar.lz zsh-d2ece376a3b50f0ca361d27fb8e55372771532dd.tar.xz zsh-d2ece376a3b50f0ca361d27fb8e55372771532dd.tar.zst zsh-d2ece376a3b50f0ca361d27fb8e55372771532dd.zip | |
10594: Fix index into $history in prompt_bart_precmd.
10591: Completion/User/_fakeroot: Completion for the fakeroot program.
10590: Completion/Linux/_rpm: Signature checking completes only local
package files.
Diffstat (limited to 'Functions/Prompts/prompt_bart_setup')
| -rw-r--r-- | Functions/Prompts/prompt_bart_setup | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/Functions/Prompts/prompt_bart_setup b/Functions/Prompts/prompt_bart_setup index d602cc9ec..0713a48af 100644 --- a/Functions/Prompts/prompt_bart_setup +++ b/Functions/Prompts/prompt_bart_setup @@ -57,22 +57,13 @@ prompt_bart_precmd () { setopt localoptions noxtrace extendedglob noksharrays # Using psvar here protects against unwanted promptsubst expansions. - psvar[8]="$history[$#history]" # Use history text, not just number - psvar[9]='' # Padding before upper right prompt + psvar[8]="$history[$[${(%):-%h}-1]]" # Use history text, not just number + psvar[9]='' # Padding before upper right prompt - if [[ -o promptsubst ]] - then - # This is a bug workaround; ${(%)...} mishandles promptsubst - repeat $[COLUMNS-${#${(%f)${${(e)PS1}//[%]\{[^%]#%\}/}}[1]}-1] - do - psvar[9]="$psvar[9] " - done - else - repeat $[COLUMNS-${#${(%f)${PS1//[%]\{[^%]#%\}/}}[1]}-1] - do - psvar[9]="$psvar[9] " - done - fi + repeat $[COLUMNS-${#${(%%f)${PS1//[%]\{[^%]#%\}/}}[1]}-1] + do + psvar[9]="$psvar[9] " + done } prompt_bart_ps1 () { |
