zsh-workers
 help / color / mirror / code / Atom feed
From: Zoltan Hidvegi <hzoli@cs.elte.hu>
To: schaefer@nbn.com
Cc: zsh-workers@math.gatech.edu
Subject: Re: Use of qualifiers without glob pattern?
Date: Thu, 27 Jun 1996 03:03:57 +0200 (MET DST)	[thread overview]
Message-ID: <199606270103.DAA05565@hzoli.ppp.cs.elte.hu> (raw)
In-Reply-To: <960626085405.ZM2495@candle.brasslantern.com> from Bart Schaefer at "Jun 26, 96 08:54:04 am"

> } The (:...) modifiers stopped working only if the argument had no wildcards
> } so *(:r) always worked.  And foo.bar(:r) works only since about a year.
> 
> Ah.
> 
> zagzig<1> i=foo.bar
> zagzig<2> echo $i:r $i(:r)
> foo foo.bar

$i:r and $i(:r) are different.  The former always works when $i is expanded
while the later is special form of filename generation (globbing).

> zagzig<3> echo ${i(:r)}
> zsh: closing brace expected

Yes, because (:r) is a glob modifier which only works if the word ends in
an unquoted closing parenthesis and there are no wildcards or embeded
parenthesis in this trailing parenthesized part of the word.

> Has this one, reported a few days ago by someone else, been fixed?
> 
> zagzig<9> echo "foo\
> > $bar"
> foo$bar
> 
> That seems like an important thing to get right.

Yes, I already fixed that but I did not send the patch.  The patch below
fixes that.

> } Maybe beta22 is not a good name for that.  It may be better
> } to call it to zsh-2.99.0 as the next stable release will be zsh-3.0.0.
> 
> Why not 3.0-prerelease, or something like that?

I think it is better if there are only numbers in the version since it is
easier to parse in scripts.  Also 3.0-prerelease is too long. 3.0-pre1 may
be better.  I used to have version specific code in my startup files but
removed these since it became too complicated to handle things like
2.5.03, 2.6-beta9, 2.6-beta21, 2.6-beta15-hzoli14, 2.6-beta??-test??
(fortunately I never tried any version older than 2.5.0 so that case can be
omitted).

But fortunately 3.0-something lexicographically comes before 3.0.something
so it is easy to handle this case which means that the next release may be
called 3.0-pre1.

Zoltan


rcsdiff -qc -kk -r2.26 -r2.27 Src/lex.c
*** Src/lex.c
--- Src/lex.c	1996/06/25 23:15:04	2.27
***************
*** 1016,1022 ****
  		add(c == '$' || c == '\\' || (c == '}' && !intick && bct) ||
  		    c == '\"' || c == '`' ? Bnull : '\\');
  	    else if (sub || unset(CSHJUNKIEQUOTES) || endchar != '"')
! 		c = hgetc();
  	    break;
  	case '\n':
  	    err = !sub && isset(CSHJUNKIEQUOTES) && endchar == '"';
--- 1016,1022 ----
  		add(c == '$' || c == '\\' || (c == '}' && !intick && bct) ||
  		    c == '\"' || c == '`' ? Bnull : '\\');
  	    else if (sub || unset(CSHJUNKIEQUOTES) || endchar != '"')
! 		continue;
  	    break;
  	case '\n':
  	    err = !sub && isset(CSHJUNKIEQUOTES) && endchar == '"';



  reply	other threads:[~1996-06-27  2:24 UTC|newest]

Thread overview: 74+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-03-12 19:03 Buffered stderr on Linux Zoltan Hidvegi
1996-03-12 19:24 ` Bart Schaefer
1996-03-12 20:26   ` Zoltan Hidvegi
1996-03-12 23:17   ` Zoltan Hidvegi
1996-03-13  0:16     ` Steven L Baur
     [not found]     ` <hzoli@cs.elte.hu>
1996-03-16 18:46       ` Bart Schaefer
1996-04-10 21:41       ` History file locking? Barton E. Schaefer
1996-04-10 22:16         ` Daniel Dignam
1996-06-26 13:51       ` Use of qualifiers without glob pattern? Bart Schaefer
1996-06-26 14:01         ` Regression tests Bas V. de Bakker
1996-06-26 14:52         ` Use of qualifiers without glob pattern? Zoltan Hidvegi
1996-06-26 15:54           ` Bart Schaefer
1996-06-27  1:03             ` Zoltan Hidvegi [this message]
1996-10-31 16:55       ` Parameter expansion bug? Bart Schaefer
1996-10-31 16:57         ` Hrvoje Niksic
1996-10-31 17:04         ` Zoltan Hidvegi
1996-10-31 17:47           ` Bart Schaefer
1996-12-13  3:37       ` fifo configure check Bart Schaefer
1996-12-13  8:58         ` fifo configure check (seems to work here: Solaris 2.4) C. v. Stuckrad
1996-12-13 14:44         ` fifo configure check Zefram
1996-12-13 17:33           ` Zoltan Hidvegi
     [not found]       ` <wayne@clari.net>
1997-01-31 22:01         ` history-search-backward Bart Schaefer
1996-04-10 10:31 History file locking? Russell Senior
1996-04-10 12:12 ` Zefram
1996-04-10 12:41   ` Zoltan Hidvegi
1996-04-10 12:50     ` Zefram
     [not found]       ` <A.Main@dcs.warwick.ac.uk>
1996-04-10 16:26         ` Barton E. Schaefer
1996-04-10 17:08           ` Anthony Heading
     [not found]             ` <aheading@jpmorgan.com>
1996-04-10 17:12               ` Barton E. Schaefer
1996-04-10 18:03                 ` Anthony Heading
1996-06-05 21:25         ` Builtin append() and prepend() to PATH, CDPATH, etc Bart Schaefer
     [not found]           ` <schaefer@candle.brasslantern.com>
1996-06-10 19:22             ` Clinton Bunch
1996-06-10 19:54               ` Bart Schaefer
1996-06-10 20:24                 ` Hrvoje Niksic
1996-06-10 20:58             ` Clinton Bunch
1996-06-24 18:26             ` BUG: useheap in doexpandhist() Barton E. Schaefer
1996-06-24 19:11               ` Zoltan Hidvegi
1996-06-24 21:20                 ` Barton E. Schaefer
1996-06-25  0:01                   ` Zoltan Hidvegi
1996-06-25  0:22                     ` Barton E. Schaefer
1996-07-23 20:01             ` Bug in case stmt with '(' Morris M. Siegel
1996-07-23 21:55               ` Bart Schaefer
1996-07-24  8:29                 ` Zefram
1996-07-24  9:52                 ` Peter Stephenson
1996-07-24 11:10         ` Bart Schaefer
1996-07-24 14:16           ` Zoltan Hidvegi
1996-04-10 21:21       ` History file locking? Zoltan Hidvegi
1996-06-02 17:59 Builtin append() and prepend() to PATH, CDPATH, etc Fung-Chai Lim
1996-06-02 21:26 ` Zoltan Hidvegi
     [not found]   ` <1062.199606041027@stone.dcs.warwick.ac.uk>
1996-06-22 20:12 BUG: useheap in doexpandhist() Bart Schaefer
     [not found] <17651.199607222123@stone.dcs.warwick.ac.uk>
1996-07-23 14:08 ` Bug in case stmt with '(' Zoltan Hidvegi
1996-07-23 16:25   ` Bart Schaefer
1996-10-31 14:41 Parameter expansion bug? Anthony Heading
1996-10-31 15:13 ` Hrvoje Niksic
1996-10-31 16:12 ` Zoltan Hidvegi
1996-10-31 20:49   ` Anthony Heading
1996-12-13  2:30 fifo configure check Zoltan Hidvegi
1997-01-31 10:47 history-search-backward Peter Stephenson
1997-01-31 12:16 ` history-search-backward Zefram
1997-01-31 12:42   ` history-search-backward Peter Stephenson
1997-01-31 15:02     ` history-search-backward Bart Schaefer
1997-01-31 15:23       ` history-search-backward Vinnie Shelton
1997-01-31 19:02     ` history-search-backward Zoltan Hidvegi
1997-01-31 19:13 ` history-search-backward Wayne Davison
2001-04-27 19:54 comptest* failed to load module: zsh/termcap Peter Whaite
2001-04-28  6:10 ` Bart Schaefer
2001-04-28  8:55   ` Andrej Borsenkow
2001-04-30 15:44     ` Peter Whaite
2001-04-30 16:30       ` Bart Schaefer
2001-04-30 16:47         ` Andrej Borsenkow
2001-04-30 17:16           ` PATCH: " Bart Schaefer
2001-04-30 18:54         ` Peter Whaite
2001-04-30 19:12           ` Bart Schaefer
2001-04-30 15:32   ` Peter Whaite

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=199606270103.DAA05565@hzoli.ppp.cs.elte.hu \
    --to=hzoli@cs.elte.hu \
    --cc=schaefer@nbn.com \
    --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).