1
0
Fork 0
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:
Sven Wischnowsky 2000-04-05 08:24:59 +00:00
parent 2c8d808759
commit bcd865f7d2
2 changed files with 15 additions and 2 deletions

View file

@ -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

View file

@ -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
}