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."
http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_25_03
next 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 ` [BUG] 'nolog' and 'debug' options cause "$-" to wreak havoc 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:
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=5bdf99b4-2bde-3710-c323-25162ace143f@inlv.org \
--to=martijn@inlv.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 read-only IMAP folder(s) and NNTP newsgroup(s).