grep(1) should not parse manpages as arguments.
Now `apropos -xfer' works.
This commit is contained in:
parent
1c66eea617
commit
b03342aca8
@ -15,7 +15,7 @@
|
|||||||
# The University of Texas at Austin
|
# The University of Texas at Austin
|
||||||
# Austin, Texas 78712
|
# Austin, Texas 78712
|
||||||
#
|
#
|
||||||
# $Id: apropos.sh,v 1.5 1996/08/27 20:03:55 wosch Exp $
|
# $Id: apropos.sh,v 1.6 1996/09/14 23:20:33 wosch Exp $
|
||||||
|
|
||||||
|
|
||||||
PATH=/bin:/usr/bin:$PATH
|
PATH=/bin:/usr/bin:$PATH
|
||||||
@ -71,7 +71,7 @@ esac
|
|||||||
|
|
||||||
for manpage
|
for manpage
|
||||||
do
|
do
|
||||||
if grep -hi $grepopt "$manpage" $mandir; then :
|
if grep -hi $grepopt -- "$manpage" $mandir; then :
|
||||||
else
|
else
|
||||||
echo "$manpage: nothing appropriate"
|
echo "$manpage: nothing appropriate"
|
||||||
fi
|
fi
|
||||||
@ -90,9 +90,9 @@ done |
|
|||||||
|
|
||||||
# nothing found, exit
|
# nothing found, exit
|
||||||
if test -z "$line" -a ! -z "$line2"; then
|
if test -z "$line" -a ! -z "$line2"; then
|
||||||
printf "$line2"
|
printf -- "$line2"
|
||||||
exit $exit_nomatch
|
exit $exit_nomatch
|
||||||
else
|
else
|
||||||
( printf "$line2"; echo $line; cat ) | $PAGER
|
( printf -- "$line2"; echo $line; cat ) | $PAGER
|
||||||
fi
|
fi
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user