mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
remove prompt to avoid double-sending problems
This commit is contained in:
parent
8ce01b22ae
commit
e87d96c291
1 changed files with 2 additions and 2 deletions
4
bin/"
4
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 .
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue