dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vadim Zeitlin <vz-dash@zeitlins.org>
To: dash@vger.kernel.org
Subject: Possibly wrong handling of $_?
Date: Tue, 23 Dec 2014 23:34:59 +0100	[thread overview]
Message-ID: <E1Y3Y2d-000276-SL@smtp.tt-solutions.com> (raw)

[-- Attachment #1: Type: TEXT/PLAIN, Size: 557 bytes --]

 Hello,

 I'm not exactly sure if this is a bug because I didn't find any
specification about how is this supposed to behave (to my surprise it
turned out that $_ was not in POSIX), but please consider this:

	% zsh -c 'echo -n foo && echo $_'
	foofoo
	% bash -c 'echo -n foo && echo $_'
	foofoo
	% dash -c 'echo -n foo && echo $_'
	foo/usr/bin/dash

I've tested several different versions of zsh (4 and 5) and bash (3 and 4)
and dash 0.5.5 and 0.5.7 from Debian and they all produced the results as
above.

 Shouldn't dash follow the other shells here?
VZ

[-- Attachment #2: Type: APPLICATION/PGP-SIGNATURE, Size: 196 bytes --]

             reply	other threads:[~2014-12-23 22:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-23 22:34 Vadim Zeitlin [this message]
2014-12-23 23:21 ` Possibly wrong handling of $_? Harald van Dijk
2014-12-23 23:33   ` Re[2]: " Vadim Zeitlin
2014-12-25 14:32     ` Jilles Tjoelker
2014-12-25 22:05       ` Harald van Dijk

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=E1Y3Y2d-000276-SL@smtp.tt-solutions.com \
    --to=vz-dash@zeitlins.org \
    --cc=dash@vger.kernel.org \
    /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.
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).