zsh-workers
 help / color / mirror / code / Atom feed
From: "Andrej Borsenkow" <Andrej.Borsenkow@mow.siemens.ru>
To: <zsh-workers@sunsite.dk>
Subject: More incompatibility :-) RE: PATCH: 3.1.9-dev-8: Re: Word splitting in zsh
Date: Tue, 13 Feb 2001 10:51:32 +0300	[thread overview]
Message-ID: <000801c09591$c7dd2790$21c9ca95@mow.siemens.ru> (raw)
In-Reply-To: <1010210202412.ZM20301@candle.brasslantern.com>

>
> OK, here's the patch; I won't commit this until I get some feedback on it.
>

This fixes one more incompatibility, so I am in favour of applying it.

Zsh:

bor@itsrm2% foo=$'foo\nbar'
bor@itsrm2% print "$foo"
foo
bar
bor@itsrm2% setopt shwordsplit
bor@itsrm2% bar=${1-$foo}
bor@itsrm2% print "$bar"
foo bar

sh:

$ foo=`echo 'foo\nbar\c'`
$ echo "$foo"
foo
bar
$ bar=${1-$foo}
$ echo "$bar"
foo
bar

This just proves my point again - wordsplitting should be done once after all
subst were done on current word. And only in context where wordsplitting is to
be actually done.

> +    static int mult_spbreak, mult_shwsplit;

They are static. Is there any chance, that two unrelated substitutions may run
at the same time? E.g. inside nested command substitution? This forms its own
context and both above must be reset.

-andrej


  parent reply	other threads:[~2001-02-13  7:51 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <000d01c0926a$ce26c590$21c9ca95@mow.siemens.ru>
2001-02-09 18:18 ` Bart Schaefer
2001-02-10 20:24   ` PATCH: 3.1.9-dev-8: " Bart Schaefer
2001-02-12  7:38     ` Andrej Borsenkow
2001-02-12 14:12       ` Andrej Borsenkow
2001-02-12 19:38         ` Bart Schaefer
2001-02-13  7:51     ` Andrej Borsenkow [this message]
2001-02-13  9:26       ` More incompatibility :-) " Bart Schaefer
2001-02-13  9:57         ` Andrej Borsenkow
2001-02-13 19:33           ` Bart Schaefer
2001-02-14 18:00             ` Peter Stephenson
2001-02-15  6:17               ` Andrej Borsenkow
2001-02-15  8:34                 ` Bart Schaefer
2001-02-15 10:35                   ` More incompatibility (word splitting) Peter Stephenson
2001-02-16  7:43                     ` PATCH: " Bart Schaefer
2001-02-16  8:50                       ` Andrej Borsenkow
2001-02-16 17:03                         ` 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='000801c09591$c7dd2790$21c9ca95@mow.siemens.ru' \
    --to=andrej.borsenkow@mow.siemens.ru \
    --cc=zsh-workers@sunsite.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).