zsh-workers
 help / color / mirror / code / Atom feed
From: Zoltan Hidvegi <hzoli@cs.elte.hu>
To: A.Main@dcs.warwick.ac.uk (Zefram)
Cc: stephens@math.ruu.nl, zsh-workers@math.gatech.edu
Subject: Re: quoting bug
Date: Fri, 21 Jun 1996 16:30:08 +0200 (MET DST)	[thread overview]
Message-ID: <199606211430.QAA03714@bolyai.cs.elte.hu> (raw)
In-Reply-To: <6066.199606211417@stone.dcs.warwick.ac.uk> from Zefram at "Jun 21, 96 03:17:10 pm"

> >> setopt SH_WORD_SPLIT
> >
> >What does POSIX say?
> 
> POSIX requires the SH_WORD_SPLIT behaviour.  It also requires field
> splitting in normal words, as well as the result of expansions:
> 
> % setopt SH_WORD_SPLIT
> % IFS=x
> % echo fooxbar
> fooxbar

No.  POSIX does not allow field splitting here:

"IFS is used for performing field splitting on the results of parameter
 and command substitution; it is not used for splitting all fields.
 Previous versions of the shell used it for splitting all fields during
 field splitting, but this has severe problems because the shell can no
 longer parse its own script.  There are also important security
 implications caused by this behavior.  All useful applications of IFS use
 it for parsing input of the read utility and for splitting the results of
 parameter and command substitution.  New versions of the shell have fixed
 this bug, and POSIX.2 requires the corrected behavior."

> I think we should implement this behaviour -- when SH_WORD_SPLIT is
> set, of course.  It should be very easy.  I also think we should retain
> the current default, as it's much nicer behaviour.

Yes, it can be implemented easily by adding IBLANK type to IFS elements but
I still think that it is unnecessary.  And there may be hidden problems as
this change affects the parser.

Zoltan



  reply	other threads:[~1996-06-21 14:42 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-06-21 13:17 Raymond Nijssen
1996-06-21 13:29 ` Zefram
1996-06-21 13:55   ` Bruce Stephens
1996-06-21 14:03     ` Zoltan Hidvegi
1996-06-21 14:24       ` quoting bug, and comparisons with ksh93 Bruce Stephens
1996-06-21 14:37         ` Zoltan Hidvegi
1996-06-21 14:17     ` quoting bug Zefram
1996-06-21 14:30       ` Zoltan Hidvegi [this message]
1996-06-21 14:43       ` Hrvoje Niksic
1996-06-21 15:18         ` Zefram
1996-06-21 14:48       ` Chet Ramey
1996-06-21 16:54   ` Raymond Nijssen

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=199606211430.QAA03714@bolyai.cs.elte.hu \
    --to=hzoli@cs.elte.hu \
    --cc=A.Main@dcs.warwick.ac.uk \
    --cc=stephens@math.ruu.nl \
    --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).