diff options
author | grai <t.lainson@gmail.com> | 2008-07-22 03:26:34 +1000 |
---|---|---|
committer | grai <t.lainson@gmail.com> | 2008-07-22 03:26:34 +1000 |
commit | 2863f80be896bdbc5bf2507c81d5331cc96482b3 (patch) | |
tree | 5c57123de3de1e1d11b3f2fb846dc397907433a3 /bin | |
parent | 881e5d1e95367ad84cac49dbb958a361b1ec998e (diff) | |
download | plan9port-2863f80be896bdbc5bf2507c81d5331cc96482b3.tar.gz plan9port-2863f80be896bdbc5bf2507c81d5331cc96482b3.tar.bz2 plan9port-2863f80be896bdbc5bf2507c81d5331cc96482b3.zip |
man: reject unrecognized flags
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/man | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -67,14 +67,15 @@ fn dohtml { # # parse flags and sections # +fn usage { echo 'Usage: man [-hnpPtw] [-s sec] [0-9] [0-9] ... [--] name1 name2 ...' >[1=2] } cmd=donroff sec=() S=$PLAN9/man d=0 while(~ $d 0) { if(~ $#* 0) { - echo 'Usage: man [-hnpPtw] [-s sec] [0-9] [0-9] ... [--] name1 name2 ...' >[1=2] - exit + usage + exit 1 } if(test -d $S/man$1){ sec=($sec $1) @@ -88,6 +89,7 @@ while(~ $d 0) { case -w ; cmd=doecho ; shift case -h ; cmd=dohtml ; shift case -- ; d=1 ; shift + case -* ; usage ; exit 1 case * ; d=1 } } |