summary refs log tree commit diff
path: root/src/funcs/kill
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2020-04-29 00:19:59 +1000
committerHerbert Xu <herbert@gondor.apana.org.au>2020-05-15 16:24:38 +1000
commit07951cfffb218291e7574b874660eab652cb54f1 (patch)
treeba85a61937b42600400e9fb7a78e0181ce627fb9 /src/funcs/kill
parentparser: Catch errors in expandstr (diff)
downloaddash-07951cfffb218291e7574b874660eab652cb54f1.tar.gz
dash-07951cfffb218291e7574b874660eab652cb54f1.zip
parser: Fix alias expansion after heredoc or newlines
This script should print OK:

	alias a="case x in " b=x
	a
	b) echo BAD;; esac

	alias BEGIN={ END=}
	BEGIN
		cat <<- EOF > /dev/null
			$(:)
		EOF
	END

	: <<- EOF &&
		$(:)
	EOF
	BEGIN
		echo OK
	END

However, because the value of checkkwd is either zeroed when it
shouldn't, or isn't zeroed when it should, dash currently gets
it wrong in every case.

This patch fixes it by saving checkkwd and zeroing it where needed.

Suggested-by: Harald van Dijk <harald@gigawatt.nl>
Reported-by: Harald van Dijk <harald@gigawatt.nl>
Reported-by: Martijn Dekker <martijn@inlv.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'src/funcs/kill')
0 files changed, 0 insertions, 0 deletions
mit/bin/title.c?id=ef72de007fc8c63650349c3d026c70335025013c&follow=1'>Use CURLINFO_CONTENT_TYPEJune McEnroe 2019-09-05Decode entities in titlesJune McEnroe 2019-09-05Print title as soon as it's availableJune McEnroe 2019-09-05Use CURL_PREFIX to set flagsJune McEnroe 2019-09-05Add titleJune McEnroe 2019-09-04Add Avorter n'est pas tuerJune McEnroe 2019-08-29Unset executable on shell scriptsJune McEnroe 2019-08-29Add long-missing setopt to bin.7June McEnroe 2019-08-29Add editJune McEnroe