ref: e652be5559a70aa339a3952889f0421b9dda5ceb
parent: fe393882506834722eda40d94289133366f5a210
author: Ori Bernstein <[email protected]>
date: Sun Mar 8 07:46:34 EDT 2020
"": output previous action to stderr When redirecting output from "", it prints the command to stdout, which garbles things like: % foo <inspect output> % "" > /dev/snarf Now, we send it to stderr.
--- a/rc/bin/""
+++ b/rc/bin/""
@@ -4,10 +4,10 @@
_x = `{" $* | tail -1}
if(~ $#_x 0) {
- echo no such command found
+ echo no such command found >[1=2]
exit notfound
}
-echo ' ' $_x
+echo ' ' $_x >[1=2]
_x=`{ echo -n 'eval '''; echo $_x | sed 's/^'$PROMPT'//; s/''/''''/g; s/$/''/'}
rc -c $"_x