Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Unquoted "-" tokenization broke glob_complete
- X-seq: zsh-workers 43969
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: <zsh-workers@xxxxxxx>
- Subject: Re: Unquoted "-" tokenization broke glob_complete
- Date: Thu, 3 Jan 2019 12:40:50 +0000
- Cms-type: 201P
- Dkim-filter: OpenDKIM Filter v2.11.0 mailout2.w1.samsung.com 20190103124052euoutp02a6557b1c5d5dc87590b83c7b63d0f663~2VxEJGxGP0255402554euoutp02U
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1546519252; bh=QVowqRTF18GOxRGBh2CIpqbYPdM7amBMQGX+hUmE9Og=; h=Subject:From:To:Date:In-Reply-To:References:From; b=d2wQrK2BlEniZlJIvI61DZdr1uqr+cnAi6pGpUxG3190+mABoDu+44Z5taAcyvXOF 45A6GKm9b52npMNjFbEfVdywzxcLxLl+TPsKSkLSNCw/SnZ0qdv07QEknL2s6zXEqa 3A9yp4MmFs+KiDg5nv6Y/yh9c7fQLN4hle6P8fXg=
- In-reply-to: <20190103120751.thttr6b3wxzkm5xw@hocevar.net>
- 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: <CGME20190103121454epcas3p4e581fa9f1880f6453e1696415bb459a4@epcas3p4.samsung.com> <20190103120751.thttr6b3wxzkm5xw@hocevar.net>
On Thu, 2019-01-03 at 13:07 +0100, Sam Hocevar wrote:
> Commit f3f8537cfa05414ad14494e809d9ebfeef86ebbc [1] broke autocompletion
> when a directory name contains a hyphen and glob_complete is active.
You're talking about old-fashioned completion when the shell comes up
raw (apart from GLOB_COMPLETE), without the completion system loaded,
right?
We've been gradually picking up these Dash problems for some time now.
It was added to be able to emulate sh pattern matching better, which is
irrelevant and (as you've found) occasionally annoying in native mode.
I'm seriously wondering if the right fix for such issues in the future
isn't simply to give up on complete compatibility for sh-style patterns
but just document the issues --- there are things that zsh really isn't
equipped to do.
pws
diff --git a/Src/Zle/compctl.c b/Src/Zle/compctl.c
index 87d13af..fe87409 100644
--- a/Src/Zle/compctl.c
+++ b/Src/Zle/compctl.c
@@ -3256,6 +3256,15 @@ makecomplistflags(Compctl cc, char *s, int incmd, int compadd)
rpl = strlen(rpre);
rsl = strlen(rsuf);
}
+ else
+ {
+ for (p = rpre; *p; ++p)
+ if (*p == Dash)
+ *p = '-';
+ for (p = rsuf; *p; ++p)
+ if (*p == Dash)
+ *p = '-';
+ }
untokenize(lpre);
untokenize(lsuf);
Messages sorted by:
Reverse Date,
Date,
Thread,
Author