plan9port/bin/quote1
Russ Cox fbe3f344c1 build: rename " and "" to quote1 and quote2 for hg
They'll be copied back during installation
but then hg doesn't have to create those files
on systems that have trouble with them.

TBR=rsc
https://codereview.appspot.com/105800043
2014-06-03 14:29:06 -04:00

27 lines
393 B
Bash
Executable file

#!/usr/local/plan9/bin/rc
. 9.rc
fn text {
if(~ $winid [0-9]*)
9p read acme/$winid/body
if not if(~ $text9term unix!*)
dial -e $text9term </dev/null
if not
status=''
}
PROMPT='[^ ]*[%;$#][ ]+'
fn cmds {
text | sed -n 's/^'$PROMPT'([^"])/ \1/p'
}
switch($#*) {
case 0
cmds | tail -1
case *
cmds | grep -n '^ '^$"* | tail -r |
sort -u +1 | sort -n |
sed 's/^[0-9]+: //'
}