mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-27 06:11:06 +02:00
fix for combining _next_tags and file-patterns
This commit is contained in:
parent
2c8d808759
commit
bcd865f7d2
2 changed files with 15 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2000-04-05 Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
|
||||
|
||||
* 10498: Completion/Commands/_next_tags: fix for handling
|
||||
file-patterns.
|
||||
|
||||
2000-04-04 Peter Stephenson <pws@pwstephenson.fsnet.co.uk>
|
||||
|
||||
* Clint: 10477: Functions/Zftp/zfcd_match: some awks don't like
|
||||
|
|
|
@ -92,12 +92,20 @@ _next_tags_sort() {
|
|||
if [[ -z "$nodef" ]]; then
|
||||
if [[ $funcstack[4] = _files ]]; then
|
||||
if zstyle -a ":completion:${curcontext}:" file-patterns tmp; then
|
||||
[[ "$argv" = *${${tmp[-1]##[^\\]:}%:*}* ]] && _next_tags_reset=yes
|
||||
[[ "$argv" = *${${tmp[-1]#*[^\\]:}%:*}* ]] && _next_tags_reset=yes
|
||||
else
|
||||
[[ "$argv" = *all-files* ]] && _next_tags_reset=yes
|
||||
fi
|
||||
fi
|
||||
comptry "${(@)argv:#(${(j:|:)~${=_next_tags_not}})(|:*)}"
|
||||
tmp=( "${(@)argv:#(${(j:|:)~${=_next_tags_not}})(|:*)}" )
|
||||
|
||||
# $prev is set in _tags!
|
||||
|
||||
if [[ -n "$prev" && ( $#tmp -ne 0 || $funcstack[4] = _files ) ]]; then
|
||||
comptry "$tmp[@]"
|
||||
else
|
||||
comptry "$argv[@]"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue