CFR: Replace man/manpath/whatis/apropos with a shell script
Anonymous
swell.k at gmail.com
Sat Sep 11 14:33:50 UTC 2010
Anonymous <swell.k at gmail.com> writes:
> PATH_MAN_SUB bin/../man
> PATH_MAN_SUB bin/../.man # e.g. for ~/.bin + ~/.man
> PATH_MAN_SUB /usr/bin/../share/man
Oops, that would be non-trivial substitution. It's more like
PATH_MAN_ADD bin ../man
PATH_MAN_ADD .bin ../.man
PATH_MAN_ADD /usr/bin ../share/man
And the code for third example would look smth like
# set by PATH_MAN_ADD first and second argument
from=/usr/bin
to=../share/man
case "$path" in
*$from) p="$path/$to"
p=$(realpath $p)
add_to_manpath "$p"
;;
esac
More information about the freebsd-current
mailing list