Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: glob flags at start of word
- X-seq: zsh-workers 43861
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: Zsh Hackers' List <zsh-workers@xxxxxxx>
- Subject: Re: PATCH: glob flags at start of word
- Date: Tue, 4 Dec 2018 17:03:42 +0000
- Cms-type: 201P
- Dkim-filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20181204170344euoutp01b1fae894c0c862a4ea41d2e9b8ba6209~tMAA5D0uQ0601206012euoutp01I
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1543943024; bh=fBIxFnNBJQQQdgzU8MWfqGqe5JGTju9zmO/ZrSRg+lc=; h=Subject:From:To:Date:In-Reply-To:References:From; b=D17qIXe+GHOi5jB+ag1ISbi6tpCFUlNfP9S/6Wc8le7xVm8CZkda361KzW7tERq2k 9ufM+0ZDyuukr3mfTDZtA92hjVOp1wZu9fEEOOsmx5TwdZLeBFPefTfstQhVmDi0Jw AZ8ziG1qyj1jon7wPYbWNAbm2CZFme6BduwcJOxU=
- In-reply-to: <1543942389.3963.21.camel@samsung.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <1543942389.3963.21.camel@samsung.com> <CGME20181204170343eucas1p211f78886fae04264445654588dc2c4b7@eucas1p2.samsung.com>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author