From e652be5559a70aa339a3952889f0421b9dda5ceb Mon Sep 17 00:00:00 2001 From: Ori Bernstein Date: Sun, 8 Mar 2020 11:46:34 -0700 Subject: [PATCH] "": output previous action to stderr When redirecting output from "", it prints the command to stdout, which garbles things like: % foo % "" > /dev/snarf Now, we send it to stderr. --- "rc/bin/\"\"" | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git "a/rc/bin/\"\"" "b/rc/bin/\"\"" index d5089583c..5f717ed7f 100755 --- "a/rc/bin/\"\"" +++ "b/rc/bin/\"\"" @@ -4,10 +4,10 @@ PROMPT='[^ ]*(%|;)+[ ]+' _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