aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 .
}