summary refs log tree commit diff
path: root/src/input.h
diff options
context:
space:
mode:
authorMartijn Dekker <martijn@inlv.org>2018-03-06 17:40:37 +0000
committerHerbert Xu <herbert@gondor.apana.org.au>2018-03-10 16:01:43 +0800
commit81a501b7fbcff8da004251a85a8f948263254aa5 (patch)
tree6b602b223b1ada208dc6718bc91a5fcf3c0d776d /src/input.h
parenthistedit: fix build with musl libc (diff)
downloaddash-81a501b7fbcff8da004251a85a8f948263254aa5.tar.gz
dash-81a501b7fbcff8da004251a85a8f948263254aa5.zip
expand: 'nolog' and 'debug' options cause "$-" to wreak havoc
Op 29-03-17 om 20:02 schreef Martijn Dekker:
> 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|

This turned out to be easy to fix. The routine producing the "$-"
expansion failed to skip options for which there is no option letter,
but only a long-form name. In dash, 'nolog' and 'debug' are currently
the only two such options. Patch below.

- Martijn

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions
h=2.1&id=8bdd1578c735931bafd213792ce5903f9f78486b&follow=1'>Add /znc commandJune McEnroe 2019-02-22Update status line after scrolling and term eventsJune McEnroe 2019-02-22Reorganize input.cJune McEnroe 2019-02-22Fix name of <raw> window in man pageJune McEnroe 2019-02-22Rename global tags with angle bracketsJune McEnroe 2019-02-22Show status window while connectingJune McEnroe 2019-02-22Reorganize UI code for the umpteenth timeJune McEnroe 2019-02-21Replace "view" with "window"June McEnroe 2019-02-21Remove ROT13June McEnroe 2019-02-21Clean up man pageJune McEnroe 2019-01-26Draw UI before connectingJune McEnroe 2019-01-25Avoid unused variable warnings with getyxJune McEnroe 2019-01-25Add GNU/Linux build instructionsJune McEnroe