summary refs log tree commit diff
path: root/src/builtins.def.in
diff options
context:
space:
mode:
authorNikolai Merinov <n.merinov@inango-systems.com>2019-04-29 19:13:37 +0500
committerHerbert Xu <herbert@gondor.apana.org.au>2020-01-20 17:52:07 +0800
commitc4f4ee8ecf85834811c252fc1df3892863572bbd (patch)
tree2f377c0f421747e5c8656c636730a824c59de625 /src/builtins.def.in
parentparser: Fix old-style command substitution here-document crash (diff)
downloaddash-c4f4ee8ecf85834811c252fc1df3892863572bbd.tar.gz
dash-c4f4ee8ecf85834811c252fc1df3892863572bbd.zip
expand: Fix trailing newlines processing in backquote expanding
According to POSIX.1-2008 we should remove newlines only at the end of
the substitution. Newlines-only substitions causes dash to remove
newlines before beggining of the substitution. The following code:

    cat <<END
    1
    $(echo "")
    2
    END

prints "1<newline>2" instead of expected "1<newline><newline>2".

This patch fixes trailing newlines processing in backquote expanding.

Signed-off-by: Nikolai Merinov <n.merinov@inango-systems.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'src/builtins.def.in')
0 files changed, 0 insertions, 0 deletions
9-13 01:03:47 -0400'>2018-09-13Rewrite UI againJune McEnroe 2018-09-12Add note about C-oJune McEnroe 2018-09-12Use formatParse split to position input cursorJune McEnroe 2018-09-12Factor out IRC formatting parsingJune McEnroe 2018-09-11Add /help equivalent to /manJune McEnroe 2018-09-11Don't render every PM as a pingJune McEnroe 2018-09-11Add urlOpenMatchJune McEnroe 2018-09-10Depend on man.sh for chroot.tar targetJune McEnroe 2018-09-10Set LESSSECURE=1 in man.shJune McEnroe 2018-09-10Add /man commandJune McEnroe 2018-09-10Install man page in chrootJune McEnroe 2018-09-10Install man pageJune McEnroe 2018-09-10Split keys into subsections and document colorsJune McEnroe 2018-09-10Add "blank" lines to chatte.1June McEnroe 2018-09-10Document key bindings in chatte.1June McEnroe 2018-09-08Document slash commands in chatte.1June McEnroe