Re: CFR: Replace man/manpath/whatis/apropos with a shell script

From: Anonymous <swell.k_at_gmail.com>
Date: Sat, 11 Sep 2010 18:29:21 +0400
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
Received on Sat Sep 11 2010 - 12:33:50 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:07 UTC