zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@ibmth.df.unipi.it>
To: zsh-workers@sunsite.auc.dk
Subject: Re: PATCH: parameter and quoting (was: Re: Completion problems.)
Date: Thu, 05 Aug 1999 15:18:05 +0200	[thread overview]
Message-ID: <9908051318.AA19836@ibmth.df.unipi.it> (raw)
In-Reply-To: "Sven Wischnowsky"'s message of "Thu, 05 Aug 1999 14:53:10 DFT." <199908051253.OAA17004@beta.informatik.hu-berlin.de>

Sven Wischnowsky wrote:
> Ah, right, hadn't thought about patterns (ahem)... "${a%'}" reports
> the error.
> 
> Hm. Should the proposed new flag apply to those, too, and change the
> current behaviour to not report the error or should the current
> behaviour of (Q) be changed?

The first possibility sounds sensible to me, too, since ksh allows
you to do

  a="'"
  echo "${a%'}"

although bash complains as well.  It's probably a grey area, since the
single UNIX specification says

   The double-quoting of patterns is different depending on where the
   double-quotes are placed:
   ${x#*}
          The asterisk is a pattern character.
   ${x#"*"}
          The literal asterisk is quoted and not special.

(in the first case they presumably mean the whole expression is quoted), so
properly placed quotes are supposed to be active and this seems to work
OK, i.e. ${a%"'"}.

-- 
Peter Stephenson <pws@ibmth.df.unipi.it>       Tel: +39 050 844536
WWW:  http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy


  reply	other threads:[~1999-08-05 13:49 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-08-05 12:53 Sven Wischnowsky
1999-08-05 13:18 ` Peter Stephenson [this message]
1999-08-05 14:22   ` Andrej Borsenkow
  -- strict thread matches above, loose matches on Subject: below --
1999-08-06  7:14 Sven Wischnowsky
1999-08-05 14:26 Sven Wischnowsky
1999-08-05 14:41 ` Andrej Borsenkow
1999-08-05 16:24 ` Bart Schaefer
1999-08-05 12:19 Sven Wischnowsky
1999-08-05 12:05 ` Peter Stephenson
1999-08-05 16:20 ` Bart Schaefer

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=9908051318.AA19836@ibmth.df.unipi.it \
    --to=pws@ibmth.df.unipi.it \
    --cc=zsh-workers@sunsite.auc.dk \
    /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).