dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martijn Dekker <martijn@inlv.org>
To: "dash@vger.kernel.org" <dash@vger.kernel.org>
Subject: [BUG] 'nolog' and 'debug' options cause "$-" to wreak havoc
Date: Wed, 29 Mar 2017 21:02:19 +0200	[thread overview]
Message-ID: <5bdf99b4-2bde-3710-c323-25162ace143f@inlv.org> (raw)

Bug: if either the 'nolog' or the 'debug' option is set, trying to
expand "$-" silently aborts parsing of an entire argument.

$ dash -o nolog -c 'set -fuC; echo "|$- are the options|"; \
	set +o nolog; echo "|$- are the options|"'
|uCf are the options|
$ dash -o debug -c 'set -fuC; echo "|$- are the options|"; \
	set +o debug; echo "|$- are the options|"'
|uCf are the options|

Also, though the 'nolog' option is POSIX[*] and (apart from this bug)
acts like POSIX, it's not documented the dash man page.

- Martijn

[*] "nolog: Prevent the entry of function definitions into the command
history; see Command History List."

             reply	other threads:[~2017-03-29 19:01 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-29 19:02 Martijn Dekker [this message]
2017-03-29 21:59 ` Stephane Chazelas

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5bdf99b4-2bde-3710-c323-25162ace143f@inlv.org \
    --to=martijn@inlv.org \
    --cc=dash@vger.kernel.org \
    --subject='Re: [BUG] '\''nolog'\'' and '\''debug'\'' options cause "$-" to wreak havoc' \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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).