* compclt-problem in beta21
@ 1996-06-20 10:32 Sverre Slotte
1996-06-20 12:59 ` Zoltan Hidvegi
0 siblings, 1 reply; 3+ messages in thread
From: Sverre Slotte @ 1996-06-20 10:32 UTC (permalink / raw)
To: zsh-workers
Hi,
I have this compctl-line in my .zshrc:
compctl -x 's[+] c[-1,-f],s[-f+]' -g '~/Mail/*(:t)' \
- 's[-f],c[-1,-f]' -f -- elm
(virtually the same as in the man-page)
This used to work fine up to beta17 (my latest version), but it does
not work with beta21 anymore. Specifically, it does not expand the
files in my ~/Mail directory. I.e:
$ elm -f +<ctrl-D>
only beeps at me, It does not list all the files in ~/Mail. Neither
does it expand individual, non-ambigous names as in:
$ elm -f +foo<tab>
This only beeps, too.
What gives?
Sverre
-------------------------------------------------------------------------
Sverre Slotte Email: sverre@iki.fi
Granbackagränden 4 E 33 Phone: + 358 0 8558 007
02210 Esbo, Finland Mobile: + 358 400 641 007
-------------------------------------------------------------------------
Nokia Research Center Phone: + 358 0 4376 6208
P.O.Box 45, 00211 Helsingfors, Finland Phax: + 358 0 4376 6856
-------------------------------------------------------------------------
Kajakken er uten sammenligning den ypperste enkeltmannsfarkost som finnes
-- Fridtjof Nansen, 1891
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: compclt-problem in beta21
1996-06-20 10:32 compclt-problem in beta21 Sverre Slotte
@ 1996-06-20 12:59 ` Zoltan Hidvegi
1996-06-20 13:25 ` Hrvoje Niksic
0 siblings, 1 reply; 3+ messages in thread
From: Zoltan Hidvegi @ 1996-06-20 12:59 UTC (permalink / raw)
To: sverre; +Cc: zsh-workers
> Hi,
>
> I have this compctl-line in my .zshrc:
>
> compctl -x 's[+] c[-1,-f],s[-f+]' -g '~/Mail/*(:t)' \
> - 's[-f],c[-1,-f]' -f -- elm
>
> (virtually the same as in the man-page)
>
> This used to work fine up to beta17 (my latest version), but it does
> not work with beta21 anymore. Specifically, it does not expand the
> files in my ~/Mail directory. I.e:
Are you sure it did work in beta17? The problem is that ~ is not a glob
character unless extendedglob is set. Also tilde and equals substitution
is not part of globbing, and the manual says that -g expands glob patterns.
So zsh just behaves as documented. But the source code and the existing
practise suggests that this is really a bug. In beta21, tokenize() only
tokenizes glob special characters. The patch below should fix that problem
by tokenizing leading ~ and =.
Zoltan
*** Src/zle_tricky.c 1996/06/15 02:20:10 2.50
--- Src/zle_tricky.c 1996/06/20 12:47:50
***************
*** 2673,2678 ****
--- 2673,2682 ----
*p = '\0';
/* Get the pattern string. */
tokenize(g = dupstring(g));
+ if (*g == '=')
+ *g = Equals;
+ if (*g == '~')
+ *g = Tilde;
remnulargs(g);
if (*g == Equals || *g == Tilde) {
/* The pattern has a `~' or `=' at the *
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: compclt-problem in beta21
1996-06-20 12:59 ` Zoltan Hidvegi
@ 1996-06-20 13:25 ` Hrvoje Niksic
0 siblings, 0 replies; 3+ messages in thread
From: Hrvoje Niksic @ 1996-06-20 13:25 UTC (permalink / raw)
To: ZSH Workers Mailing List
Zoltan Hidvegi (hzoli@cs.elte.hu) wrote:
> is not part of globbing, and the manual says that -g expands glob patterns.
> So zsh just behaves as documented. But the source code and the existing
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Not really. The man-page states:
compctl -u -x 's[+] c[-1,-f],s[-f+]' -g '~/Mail/*(:t)' \
- 's[-f],c[-1,-f]' -f -- mail
It seems to suggest that -g expands the ~.
--
hniksic@srce.hr | Student of electrical engineering
hniksic@fly.cc.fer.hr | University of Zagreb, Croatia
------------------------------------------------------------------
Signature on strike!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1996-06-20 13:39 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-06-20 10:32 compclt-problem in beta21 Sverre Slotte
1996-06-20 12:59 ` Zoltan Hidvegi
1996-06-20 13:25 ` Hrvoje Niksic
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).