mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-28 01:11:15 -03:00
Documentation updates
darcs-hash:20051015101245-ac50b-e49bdc40a0130ef1db42165919ab3e0a382121fe.gz
This commit is contained in:
@@ -717,7 +717,7 @@ function psub -d "Read from stdin into a file and output the filename. Remove th
|
||||
echo psub: Not inside of command substitution
|
||||
end
|
||||
|
||||
# Find unique file name
|
||||
# Find unique file name for writing output to
|
||||
while true
|
||||
set filename /tmp/.psub.(echo %self).(random);
|
||||
if not test -e $filename
|
||||
@@ -725,8 +725,12 @@ function psub -d "Read from stdin into a file and output the filename. Remove th
|
||||
end
|
||||
end
|
||||
|
||||
# Write output to file
|
||||
cat >$filename
|
||||
|
||||
# Write filename to stdout
|
||||
echo $filename
|
||||
|
||||
# Find unique function name
|
||||
while true
|
||||
set funcname __fish_psub_(random);
|
||||
@@ -735,10 +739,9 @@ function psub -d "Read from stdin into a file and output the filename. Remove th
|
||||
end
|
||||
end
|
||||
|
||||
# Make sure we erase file when caller exits
|
||||
eval function $funcname --on-job-exit caller\; rm $filename\; functions -e $funcname\; end
|
||||
|
||||
echo $filename
|
||||
|
||||
end
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user