aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorrsc <devnull@localhost>2006-10-12 02:28:31 +0000
committerrsc <devnull@localhost>2006-10-12 02:28:31 +0000
commite87d96c291c35ebc302ee4627867bdc1b6acd058 (patch)
treeca7e7e229def16d13eebe0e05aca4350f66c953a /bin
parent8ce01b22aea99a47326a3f9e3e774ce90cdbb193 (diff)
downloadplan9port-e87d96c291c35ebc302ee4627867bdc1b6acd058.tar.gz
plan9port-e87d96c291c35ebc302ee4627867bdc1b6acd058.tar.bz2
plan9port-e87d96c291c35ebc302ee4627867bdc1b6acd058.zip
remove prompt to avoid double-sending problems
Diffstat (limited to 'bin')
-rwxr-xr-xbin/"4
1 files changed, 2 insertions, 2 deletions
diff --git a/bin/" b/bin/"
index a8452a95..75528483 100755
--- a/bin/"
+++ b/bin/"
@@ -14,14 +14,14 @@ fn text {
PROMPT='[^ ]*[%;$#][ ]+'
fn cmds {
- text | grep '^'$PROMPT'[^"]' | sed 's/^/ /'
+ text | sed -n 's/^'$PROMPT'([^"])/ \1/p'
}
switch($#*) {
case 0
cmds | tail -1
case *
- cmds | grep '^ '$PROMPT^$"* | {echo; cat} |
+ cmds | grep '^ '^$"* | {echo; cat} |
pr -t -n | sort -nr | sort -u +1 | sort -n |
sed 's/^ *[0-9]+ //' | grep .
}