mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-07 23:51:14 +02:00
users/24892: fix local declaration with recursive-files style and complete it for zstyle
This commit is contained in:
parent
c5f12fb732
commit
cce88bdb0c
3 changed files with 13 additions and 5 deletions
|
@ -1,3 +1,9 @@
|
|||
2020-06-11 Oliver Kiddle <okiddle@yahoo.co.uk>
|
||||
|
||||
* users/24892: Completion/Unix/Type/_files,
|
||||
Completion/Zsh/Command/_zstyle: fix local declaration with
|
||||
recursive-files style and complete it for zstyle
|
||||
|
||||
2020-06-10 Daniel Shahaf <d.s@daniel.shahaf.name>
|
||||
|
||||
* unposted: Doc/Zsh/mod_zutil.yo: zstyle docs: Fix typo.
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#compdef -redirect-,-default-,-default-
|
||||
|
||||
local -a match mbegin mend
|
||||
local -a subtree
|
||||
local ret=1
|
||||
|
||||
# Look for glob qualifiers. This is duplicated from _path_files because
|
||||
|
@ -110,7 +111,6 @@ for def in "$pats[@]"; do
|
|||
if _path_files -g "$pat" "$opts[@]" "$expl[@]"; then
|
||||
ret=0
|
||||
elif [[ $PREFIX$SUFFIX != */* ]] && zstyle -a ":completion:${curcontext}:$tag" recursive-files rfiles; then
|
||||
local subtree
|
||||
for rfile in $rfiles; do
|
||||
if [[ $PWD/ = ${~rfile} ]]; then
|
||||
if [[ -z $subtree ]]; then
|
||||
|
|
|
@ -100,6 +100,7 @@ styles=(
|
|||
preserve-prefix c:preserve-prefix
|
||||
range c:
|
||||
recent-dirs-insert c:recent-dirs-insert
|
||||
recursive-files c:
|
||||
regular c:bool
|
||||
rehash c:bool
|
||||
remote-access c:bool
|
||||
|
@ -409,14 +410,15 @@ while (( $#state )); do
|
|||
;;
|
||||
|
||||
(function)
|
||||
_wanted control-function expl 'control function' \
|
||||
_wanted control-functions expl 'control function' \
|
||||
compadd predict-on all-matches
|
||||
;;
|
||||
|
||||
(functions)
|
||||
_wanted comp-widget expl 'completion widget' \
|
||||
compadd $suf - all-matches complete-debug complete-tag \
|
||||
correct-word expand-word expand-alias-word history-words
|
||||
_wanted comp-widgets expl 'completion widget' \
|
||||
compadd $suf -M 'r:|-=* r:|=*' - all-matches complete-debug complete-tag \
|
||||
correct-word expand-word expand-alias-word history-words \
|
||||
${${${(M)${(f)"$(_call_program comp-widgets zle -l)"}:#*-C*}:#_*}/ -C*}
|
||||
;;
|
||||
|
||||
(user-host-port)
|
||||
|
|
Loading…
Reference in a new issue