1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-23 04:30:24 +02:00

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.
This commit is contained in:
Bart Schaefer 2000-04-08 21:04:47 +00:00
parent b4a2b47b64
commit d2ece376a3
4 changed files with 19 additions and 17 deletions

View file

@ -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 () {