zsh-workers
 help / color / mirror / code / Atom feed
* bug: _files depends on extendedglob
@ 2024-03-29 15:50 D. Ben Knoble
  2024-03-29 17:23 ` Mikael Magnusson
  0 siblings, 1 reply; 7+ messages in thread
From: D. Ben Knoble @ 2024-03-29 15:50 UTC (permalink / raw)
  To: zsh-workers

Here's a transcript from a session after I finally pieced together
what was breaking in
https://github.com/benknoble/Dotfiles/commit/9c7dd6d1ec8b3caac670f1a2a030769a4c90c06c,
which contains in its message more details about how I debugged this
particular failure.

zsh --version
zsh 5.9 (x86_64-apple-darwin20.6.0)
# macOS 12.7.2
zsh -f
temp=$(mktemp -d)
fpath+=($temp)
wget https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.zsh
-o $temp/_git
autoload -Uz compinit && compinit
_git_doc () { emulate -L zsh
  _files -W $(git --html-path)/
}
git doc <TAB>
# (eval):1: no matches found: *:globbed-files
# completion results still produced
_git_doc () { emulate -L zsh
  setopt extendedglob
  _files -W $(git --html-path)/
}
git doc <TAB>
# works like a charm

I'm not sure what the appropriate fix is, though I think some
combination of localopts and extendedglob might work? I see that some
parts of _files test for extendedglob, but the part that sets pats
that leads to the failure (line 78 for me) seems to be affected
without any test.

-- 
D. Ben Knoble


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2024-03-30 15:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-29 15:50 bug: _files depends on extendedglob D. Ben Knoble
2024-03-29 17:23 ` Mikael Magnusson
2024-03-29 17:44   ` Ben Knoble
2024-03-29 19:40     ` Bart Schaefer
2024-03-29 19:43     ` Oliver Kiddle
2024-03-30 15:27       ` D. Ben Knoble
2024-03-30 15:46         ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).