aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2006-10-12 02:25:31 +0000
committerrsc <devnull@localhost>2006-10-12 02:25:31 +0000
commit8ce01b22aea99a47326a3f9e3e774ce90cdbb193 (patch)
tree87500bf038ee87e898982527da10b22461bf9d7a /bin
parent6007b4d97bc6332eaa831d3e9fdd0bad259e0bfe (diff)
downloadplan9port-8ce01b22aea99a47326a3f9e3e774ce90cdbb193.tar.gz
plan9port-8ce01b22aea99a47326a3f9e3e774ce90cdbb193.tar.bz2
plan9port-8ce01b22aea99a47326a3f9e3e774ce90cdbb193.zip
use all 9 commands (Karl Sackett)
Diffstat (limited to 'bin')
-rwxr-xr-xbin/"8
1 files changed, 5 insertions, 3 deletions
diff --git a/bin/" b/bin/"
index c1571d77..a8452a95 100755
--- a/bin/"
+++ b/bin/"
@@ -1,5 +1,7 @@
#!/usr/local/plan9/bin/rc
+. 9.rc
+
fn text {
if(~ $winid [0-9]*)
9p read acme/$winid/body
@@ -12,16 +14,16 @@ fn text {
PROMPT='[^ ]*[%;$#][ ]+'
fn cmds {
- text | 9 grep '^'$PROMPT'[^"]' | sed 's/^/ /'
+ text | grep '^'$PROMPT'[^"]' | sed 's/^/ /'
}
switch($#*) {
case 0
cmds | tail -1
case *
- cmds | 9 grep '^ '$PROMPT^$"* | {echo; cat} |
+ cmds | grep '^ '$PROMPT^$"* | {echo; cat} |
pr -t -n | sort -nr | sort -u +1 | sort -n |
- 9 sed 's/^ *[0-9]+ //' | grep .
+ sed 's/^ *[0-9]+ //' | grep .
}
# the silly {echo; cat} gets around pr printing "empty file" when