rc man: Make the use of $MANPATH portable

This commit is contained in:
Frank LENORMAND 2020-04-27 07:19:30 +00:00 committed by Maxime Coste
parent 83cdaee002
commit c6906be475

View File

@ -55,7 +55,7 @@ define-command -hidden -params 2..3 man-impl %{ evaluate-commands %sh{
define-command -params ..1 \
-shell-script-candidates %{
find /usr/share/man/ $(echo $MANPATH | sed 's/:/ /') -name '*.[1-8]*' | sed 's,^.*/\(.*\)\.\([1-8][a-zA-Z]*\).*$,\1(\2),'
find /usr/share/man/ $(printf %s "${MANPATH}" | sed 's/:/ /') -name '*.[1-8]*' | sed 's,^.*/\(.*\)\.\([1-8][a-zA-Z]*\).*$,\1(\2),'
} \
-docstring %{
man [<page>]: manpage viewer wrapper