summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstanley lieber <stanley.lieber@gmail.com>2017-05-28 15:45:07 -0400
committerstanley lieber <stanley.lieber@gmail.com>2017-05-28 15:45:07 -0400
commitdb46e826c23973ee2cdc93a2fcbe465fc022d0ff (patch)
tree6806c1e016e891e17abf1d045819dfa6dbc585b3
parent9c70c81e708bf576833b8f2079c0c07242c1c8cc (diff)
downloadplan9front-db46e826c23973ee2cdc93a2fcbe465fc022d0ff.tar.xz
newt: add !cmd
-rwxr-xr-xrc/bin/newt3
-rwxr-xr-xsys/man/1/newt3
2 files changed, 6 insertions, 0 deletions
diff --git a/rc/bin/newt b/rc/bin/newt
index 25b0ecaec..2574e38b3 100755
--- a/rc/bin/newt
+++ b/rc/bin/newt
@@ -122,6 +122,7 @@ y synchronize message list with server
" print message in quoted form, suitable for reply
|cmd pipe message body to a command
||cmd pipe raw message to a command
+!cmd run a command
? print debug information'
}
fn np{
@@ -294,6 +295,8 @@ while(){
case '|'*
cmd=`{echo $"cmd | sed 's/^\|//g'}
cat $mnt/$group/^$rposts($post)^/body | eval $cmd
+ case '!'*
+ eval `{echo $"cmd | sed 's/^\!//g'}
case '?'
echo editor: $editor
echo pager: $pager
diff --git a/sys/man/1/newt b/sys/man/1/newt
index 3c51477ea..5dab90e89 100755
--- a/sys/man/1/newt
+++ b/sys/man/1/newt
@@ -140,6 +140,9 @@ Run the
.I command
with the whole message as standard input.
.TP
+.BI ! command
+Escape to the shell to do command.
+.TP
\fB"\fP
Print the current message in quoted form, suitable for reply.
.PP