zsh-workers
 help / color / mirror / code / Atom feed
From: Zoltan Hidvegi <hzoli@cs.elte.hu>
To: sverre@iki.fi
Cc: zsh-workers@math.gatech.edu
Subject: Re: compclt-problem in beta21
Date: Thu, 20 Jun 1996 14:59:03 +0200 (MET DST)	[thread overview]
Message-ID: <199606201259.OAA14383@bolyai.cs.elte.hu> (raw)
In-Reply-To: <199606201032.NAA04210@nike.spices> from Sverre Slotte at "Jun 20, 96 01:32:32 pm"

> 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  *



  reply	other threads:[~1996-06-20 13:11 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-06-20 10:32 Sverre Slotte
1996-06-20 12:59 ` Zoltan Hidvegi [this message]
1996-06-20 13:25   ` Hrvoje Niksic

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199606201259.OAA14383@bolyai.cs.elte.hu \
    --to=hzoli@cs.elte.hu \
    --cc=sverre@iki.fi \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).