* PATCH: glob flags at start of word [not found] <CGME20181204165310eucas1p15a1a87a45a4de6508fa8457a64e5d9cf@eucas1p1.samsung.com> @ 2018-12-04 16:53 ` Peter Stephenson [not found] ` <CGME20181204170343eucas1p211f78886fae04264445654588dc2c4b7@eucas1p2.samsung.com> 0 siblings, 1 reply; 2+ messages in thread From: Peter Stephenson @ 2018-12-04 16:53 UTC (permalink / raw) To: Zsh Hackers' List ls (#<TAB> doesn't complete as globbing flags are treated as a special case of glob qualifiers, which can't be completed here. Fairly minor but I can't see any good reason not to fix it. pws diff --git a/Completion/Unix/Type/_files b/Completion/Unix/Type/_files index 2b0c558..d44ac31 100644 --- a/Completion/Unix/Type/_files +++ b/Completion/Unix/Type/_files @@ -17,6 +17,10 @@ if _have_glob_qual $PREFIX; then _globquals && ret=0 fi return ret +elif [[ $_comp_caller_options[extendedglob] == on ]] && compset -P '\(\#'; then + # Globbing flags can start at beginning of word, even though + # glob qualifiers can't. + _globflags && return fi local opts tmp glob pat pats expl tag i def descr end ign tried ^ permalink raw reply [flat|nested] 2+ messages in thread
[parent not found: <CGME20181204170343eucas1p211f78886fae04264445654588dc2c4b7@eucas1p2.samsung.com>]
* Re: PATCH: glob flags at start of word [not found] ` <CGME20181204170343eucas1p211f78886fae04264445654588dc2c4b7@eucas1p2.samsung.com> @ 2018-12-04 17:03 ` Peter Stephenson 0 siblings, 0 replies; 2+ messages in thread From: Peter Stephenson @ 2018-12-04 17:03 UTC (permalink / raw) To: Zsh Hackers' List On Tue, 2018-12-04 at 16:53 +0000, Peter Stephenson wrote: > ls (#<TAB> > > doesn't complete as globbing flags are treated as a special case of glob > qualifiers, which can't be completed here. > > Fairly minor but I can't see any good reason not to fix it. This might be safer... pws diff --git a/Completion/Unix/Type/_files b/Completion/Unix/Type/_files index d44ac31..e3212c9 100644 --- a/Completion/Unix/Type/_files +++ b/Completion/Unix/Type/_files @@ -17,7 +17,7 @@ if _have_glob_qual $PREFIX; then _globquals && ret=0 fi return ret -elif [[ $_comp_caller_options[extendedglob] == on ]] && compset -P '\(\#'; then +elif [[ $_comp_caller_options[extendedglob] == on && $PREFIX = \(\#[^\)]# ]] && compset -P '\(\#'; then # Globbing flags can start at beginning of word, even though # glob qualifiers can't. _globflags && return ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-12-04 17:03 UTC | newest] Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <CGME20181204165310eucas1p15a1a87a45a4de6508fa8457a64e5d9cf@eucas1p1.samsung.com> 2018-12-04 16:53 ` PATCH: glob flags at start of word Peter Stephenson [not found] ` <CGME20181204170343eucas1p211f78886fae04264445654588dc2c4b7@eucas1p2.samsung.com> 2018-12-04 17:03 ` Peter Stephenson
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).