Update psub for the new --inherit-variable flag

Also do some minor formatting cleanup, make psub return 1 when executed
outside of a command substitution, and make it respect $TMPDIR.
This commit is contained in:
Kevin Ballard
2014-10-02 16:32:16 -07:00
parent cfc06203e7
commit 33a76e1f8e
3 changed files with 22 additions and 5 deletions

View File

@@ -1,3 +1,4 @@
# vim: set filetype=fish:
# ensure that builtins that produce no output can still truncate files
# (bug PCA almost reintroduced!)
echo "Testing that builtins can truncate files"
@@ -89,4 +90,11 @@ cat (echo foo | psub)
cat (echo bar | psub)
cat (echo baz | psub)
set -l filename (echo foo | psub)
if test -e $filename
echo 'psub file was not deleted'
else
echo 'psub file was deleted'
end
false