dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [BUG] 'nolog' and 'debug' options cause "$-" to wreak havoc
@ 2017-03-29 19:02 Martijn Dekker
  2017-03-29 21:59 ` Stephane Chazelas
  0 siblings, 1 reply; 2+ messages in thread
From: Martijn Dekker @ 2017-03-29 19:02 UTC (permalink / raw)
  To: dash

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-03-29 22:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-03-29 19:02 [BUG] 'nolog' and 'debug' options cause "$-" to wreak havoc Martijn Dekker
2017-03-29 21:59 ` Stephane Chazelas

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