summary refs log tree commit diff
path: root/src/cd.c
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2007-11-11 15:27:00 +0800
committerHerbert Xu <herbert@gondor.apana.org.au>2007-11-11 15:27:00 +0800
commitf4ee8c859c3d3fe6c5b540bffa6a0b6f320f8b3e (patch)
tree22b3d58db0458f6e4c03a30422c4708dc0e2ff7e /src/cd.c
parent[EXPAND] Removed herefd hack (diff)
downloaddash-f4ee8c859c3d3fe6c5b540bffa6a0b6f320f8b3e.tar.gz
dash-f4ee8c859c3d3fe6c5b540bffa6a0b6f320f8b3e.zip
[EXPAND] Expand here-documents in the current shell environment
Previously we always expanded here-documents in a subshell.  This is
contrary to the POSIX specification and how other shells behave.  What's
more this slows down many expansions due to the extra fork (however, it
must be said that it is possible for it speed up certain expansions by
running it simultaneously with the command on two CPUs).

This patch move the expansion into the current shell environment.

Test case:

	unset a
	cat <<- EOF > /dev/null
		${a=NOT}
	EOF
	echo ${a}BAD

Old result:

	BAD

New result:

	NOTBAD
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions
ect'>Add ISUPPORT draft to STANDARDSJune McEnroe 2019-10-23Track own originJune McEnroe 2019-10-23Track channels and sync ISUPPORTJune McEnroe 2019-10-23Track nick changesJune McEnroe 2019-10-23Rename Command to MessageJune McEnroe 2019-10-23Synchronize state after client registrationJune McEnroe 2019-10-23Send to server if client has no needsJune McEnroe 2019-10-23Implement some amount of client connectionJune McEnroe 2019-10-23Set clients non-blockingJune McEnroe 2019-10-23Clean up state.c and factor out parsingJune McEnroe 2019-10-23Respond to pingsJune McEnroe 2019-10-23Add verbose flagJune McEnroe 2019-10-23Set NOSIGPIPE on server connectionJune McEnroe 2019-10-23Set an initial loop capJune McEnroe 2019-10-23Fix rest parsingJune McEnroe 2019-10-23Add dynamic poll listJune McEnroe 2019-10-23Don't assume commands have targets and handle ERRORJune McEnroe 2019-10-23Clean up state somewhatJune McEnroe 2019-10-23Actually send the buffer...June McEnroe 2019-10-23Add stateJune McEnroe