mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-11-01 06:20:55 +01:00
make history completion use I{PREF,SUF}FIX (12011)
This commit is contained in:
parent
3ecad25c83
commit
1c710d4627
4 changed files with 18 additions and 0 deletions
|
|
@ -1,3 +1,9 @@
|
|||
2000-06-21 Sven Wischnowsky <wischnow@zsh.org>
|
||||
|
||||
* 12011: Completion/Commands/_history_complete_word,
|
||||
Completion/Core/_expand, Completion/Core/_history: make history
|
||||
completion use I{PREF,SUF}FIX
|
||||
|
||||
2000-06-20 Oliver Kiddle <opk@zsh.org>
|
||||
|
||||
* unposted: Src/exec.c: AIX dependency fix
|
||||
|
|
|
|||
|
|
@ -85,6 +85,11 @@ _history_complete_word_gen_matches () {
|
|||
opt="${opt}V"
|
||||
fi
|
||||
|
||||
PREFIX="$IPREFIX$PREFIX"
|
||||
IPREFIX=
|
||||
SUFFIX="$SUFFIX$ISUFFIX"
|
||||
ISUFFIX=
|
||||
|
||||
h_words=( "${(@)historywords[2,-1]}" )
|
||||
_wanted "$opt" history-words expl 'history word' \
|
||||
compadd -Q -a h_words
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@ else
|
|||
word="$IPREFIX$PREFIX$SUFFIX$ISUFFIX"
|
||||
fi
|
||||
|
||||
[[ "$word" = *\$\{[^\}]# ]] && return 1
|
||||
|
||||
zstyle -T ":completion:${curcontext}:" suffix &&
|
||||
[[ "$word" = (\~*/*|\$[a-zA-Z0-9_\[\]]##[^a-zA-Z0-9_\[\]]*|\$\{*\}?*) ]] &&
|
||||
return 1
|
||||
|
|
|
|||
|
|
@ -30,6 +30,11 @@ else
|
|||
opt="${opt}V"
|
||||
fi
|
||||
|
||||
PREFIX="$IPREFIX$PREFIX"
|
||||
IPREFIX=
|
||||
SUFFIX="$SUFFIX$ISUFFIX"
|
||||
ISUFFIX=
|
||||
|
||||
# We skip the first element of historywords so the current word doesn't
|
||||
# interfere with the completion
|
||||
h_words=( "${(@)historywords[2,-1]}" )
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue