diff options
author | Ori Bernstein <ori@eigenstate.org> | 2020-03-08 11:46:34 -0700 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2020-03-08 11:46:34 -0700 |
commit | e652be5559a70aa339a3952889f0421b9dda5ceb (patch) | |
tree | eafee20b2f97d5caf165f720fd9ba2ad3267bc78 | |
parent | fe393882506834722eda40d94289133366f5a210 (diff) | |
download | plan9front-e652be5559a70aa339a3952889f0421b9dda5ceb.tar.xz |
"": 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.
-rwxr-xr-x | rc/bin/"" | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |