git: 9front

Download patch

ref: 338be246d750a39be08d5d51e32b82e96db4b3f5
parent: c6cd78f67faac79ea43b0e4ff9891c118a15b63d
author: stanley lieber <stanley.lieber@gmail.com>
date: Sun May 28 11:45:07 EDT 2017

newt: add !cmd

--- a/rc/bin/newt
+++ b/rc/bin/newt
@@ -122,6 +122,7 @@
 "		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 @@
 	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
--- a/sys/man/1/newt
+++ b/sys/man/1/newt
@@ -140,6 +140,9 @@
 .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
--