]> git.lizzy.rs Git - plan9front.git/commitdiff
newt: add !cmd
authorstanley lieber <stanley.lieber@gmail.com>
Sun, 28 May 2017 19:45:07 +0000 (15:45 -0400)
committerstanley lieber <stanley.lieber@gmail.com>
Sun, 28 May 2017 19:45:07 +0000 (15:45 -0400)
rc/bin/newt
sys/man/1/newt

index 25b0ecaec83467e201f1032b58d4cd47929dfc36..2574e38b384fe173f5825d1daa86585c8874c1e2 100755 (executable)
@@ -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
index 3c51477ea12eed953d674f8c04295d8b09555190..5dab90e89cfb056c1fc7d761ecc42b60ea020195 100755 (executable)
@@ -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