change scripts back to /usr/local/plan9/bin/rc. sigh.
man replaces 9man
This commit is contained in:
parent
c70667367f
commit
2b85f70db0
11 changed files with 17 additions and 59 deletions
8
bin/"
8
bin/"
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env $PLAN9/bin/rc
|
#!/usr/local/plan9/bin/rc
|
||||||
|
|
||||||
fn text {
|
fn text {
|
||||||
if(~ $winid [0-9]*)
|
if(~ $winid [0-9]*)
|
||||||
|
|
@ -12,16 +12,16 @@ fn text {
|
||||||
PROMPT='[^ ]*[%;$#][ ]+'
|
PROMPT='[^ ]*[%;$#][ ]+'
|
||||||
|
|
||||||
fn cmds {
|
fn cmds {
|
||||||
text | 9grep '^'$PROMPT'[^"]' | sed 's/^/ /'
|
text | 9 grep '^'$PROMPT'[^"]' | sed 's/^/ /'
|
||||||
}
|
}
|
||||||
|
|
||||||
switch($#*) {
|
switch($#*) {
|
||||||
case 0
|
case 0
|
||||||
cmds | tail -1
|
cmds | tail -1
|
||||||
case *
|
case *
|
||||||
cmds | 9grep '^ '$PROMPT^$"* | {echo; cat} |
|
cmds | 9 grep '^ '$PROMPT^$"* | {echo; cat} |
|
||||||
pr -t -n | sort -nr | sort -u +1 | sort -n |
|
pr -t -n | sort -nr | sort -u +1 | sort -n |
|
||||||
9sed 's/^ *[0-9]+ //' | grep .
|
9 sed 's/^ *[0-9]+ //' | grep .
|
||||||
}
|
}
|
||||||
|
|
||||||
# the silly {echo; cat} gets around pr printing "empty file" when
|
# the silly {echo; cat} gets around pr printing "empty file" when
|
||||||
|
|
|
||||||
4
bin/""
4
bin/""
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env $PLAN9/bin/rc
|
#!/usr/local/plan9/bin/rc
|
||||||
|
|
||||||
PROMPT='[^ ]*[%;$#][ ]+'
|
PROMPT='[^ ]*[%;$#][ ]+'
|
||||||
|
|
||||||
|
|
@ -7,7 +7,7 @@ PROMPT='[^ ]*[%;$#][ ]+'
|
||||||
tail -1 |
|
tail -1 |
|
||||||
tee >{wc -l >/tmp/qq.$pid} |
|
tee >{wc -l >/tmp/qq.$pid} |
|
||||||
tee /dev/stderr |
|
tee /dev/stderr |
|
||||||
9sed 's/^ '$PROMPT'//' |
|
9 sed 's/^ '$PROMPT'//' |
|
||||||
rc
|
rc
|
||||||
|
|
||||||
if(~ `{cat /tmp/qq.$pid} 0){
|
if(~ `{cat /tmp/qq.$pid} 0){
|
||||||
|
|
|
||||||
2
bin/9
2
bin/9
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
export PLAN9=/Users/rsc/plan9
|
export PLAN9=/usr/local/plan9
|
||||||
export PATH=$PLAN9/bin:$PATH
|
export PATH=$PLAN9/bin:$PATH
|
||||||
|
|
||||||
case $# in
|
case $# in
|
||||||
|
|
|
||||||
43
bin/9man
43
bin/9man
|
|
@ -1,43 +0,0 @@
|
||||||
#! /bin/sh
|
|
||||||
root=$PLAN9/man
|
|
||||||
|
|
||||||
while [ $# -gt 0 ] ; do
|
|
||||||
case $1 in
|
|
||||||
[0-9]) sec="$sec $1" ;;
|
|
||||||
*) break ;;
|
|
||||||
esac
|
|
||||||
shift
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ "X$sec" = "X" ] ; then
|
|
||||||
sec=`ls -d $root/man[0-9]* | sed -e 's;/$;;' -e 's;^.*/man;;'`
|
|
||||||
fi
|
|
||||||
|
|
||||||
pat='^('`echo $* | sed -e 's; ;|;g'`')' ;
|
|
||||||
for s in $sec ; do
|
|
||||||
if [ -f $root/$s/INDEX ] ; then
|
|
||||||
try=`grep -E $pat $root/man$s/INDEX | sed -e 's;^[^ ]* ;;'` ;
|
|
||||||
fi
|
|
||||||
if [ "X$try" != "X" ] ; then
|
|
||||||
for f in $try ; do
|
|
||||||
files="$files $root/man$s/$f.$s";
|
|
||||||
done
|
|
||||||
try="";
|
|
||||||
fi
|
|
||||||
for f in $* ; do
|
|
||||||
if [ -f $root/man$s/$f.$s ] ; then
|
|
||||||
files="$files $root/man$s/$f.$s" ;
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
done
|
|
||||||
|
|
||||||
files=`echo $files | tr ' ' '\n' | sort -u`;
|
|
||||||
|
|
||||||
if [ "X$files" = "X" ] ; then
|
|
||||||
echo "No manual entry for $*";
|
|
||||||
exit 1;
|
|
||||||
fi
|
|
||||||
|
|
||||||
exmac=".de EX\n.ift .ft 5\n.nf\n..\n.de EE\n.ft1\n.fi\n.."
|
|
||||||
( echo -e $exmac ; cat $files ) | nroff -man
|
|
||||||
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env $PLAN9/bin/rc
|
#!/usr/local/plan9/bin/rc
|
||||||
|
|
||||||
# Click on an acme directory window and then execute Getdir
|
# Click on an acme directory window and then execute Getdir
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env $PLAN9/bin/rc
|
#!/usr/local/plan9/bin/rc
|
||||||
|
|
||||||
. $PLAN9/lib/acme.rc
|
. $PLAN9/lib/acme.rc
|
||||||
|
|
||||||
|
|
@ -76,7 +76,7 @@ case 0
|
||||||
dictwin /adict/$dict/ $dict
|
dictwin /adict/$dict/ $dict
|
||||||
case *
|
case *
|
||||||
if(~ $dict NONE){
|
if(~ $dict NONE){
|
||||||
dict=`{dict -d'?' | 9sed -n 's/^ ([^\[ ]+).*/\1/p' | sed 1q}
|
dict=`{dict -d'?' | 9 sed -n 's/^ ([^\[ ]+).*/\1/p' | sed 1q}
|
||||||
if(~ $#dict 0){
|
if(~ $#dict 0){
|
||||||
echo 'no dictionaries present on this system' >[1=2]
|
echo 'no dictionaries present on this system' >[1=2]
|
||||||
exit nodict
|
exit nodict
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
#!/usr/bin/env rc
|
#!/usr/local/plan9/bin/rc
|
||||||
|
|
||||||
# doctype: synthesize proper command line for troff
|
# doctype: synthesize proper command line for troff
|
||||||
|
|
||||||
troff=troff
|
troff=troff
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env $PLAN9/bin/rc
|
#!/usr/local/plan9/bin/rc
|
||||||
# Usage: lookman key ...
|
# Usage: lookman key ...
|
||||||
# prints out the names of all manual pages containing all the given keywords
|
# prints out the names of all manual pages containing all the given keywords
|
||||||
index=$PLAN9/man/lookman.index
|
index=$PLAN9/man/lookman.index
|
||||||
|
|
|
||||||
2
bin/man
2
bin/man
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env rc
|
#!/usr/local/plan9/bin/rc
|
||||||
|
|
||||||
. $PLAN9/man/fonts
|
. $PLAN9/man/fonts
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env $PLAN9/bin/rc
|
#!/usr/local/plan9/bin/rc
|
||||||
|
|
||||||
spellflags=()
|
spellflags=()
|
||||||
deroffargs=()
|
deroffargs=()
|
||||||
|
|
|
||||||
4
bin/src
4
bin/src
|
|
@ -1,11 +1,11 @@
|
||||||
#!/usr/bin/env $PLAN9/bin/rc
|
#!/usr/local/plan9/bin/rc
|
||||||
|
|
||||||
sym = 'threadmain?z
|
sym = 'threadmain?z
|
||||||
p9main?z
|
p9main?z
|
||||||
main?z'
|
main?z'
|
||||||
|
|
||||||
fn dbsrc{
|
fn dbsrc{
|
||||||
echo $sym | db $1 | 9sed '1d;/symbol not found/d;s/.*\(\) //'
|
echo $sym | db $1 | 9 sed '1d;/symbol not found/d;s/.*\(\) //'
|
||||||
}
|
}
|
||||||
|
|
||||||
fn go{
|
fn go{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue