From c6906be475832558f057c4a22d00d56f128414bc Mon Sep 17 00:00:00 2001 From: Frank LENORMAND <1379068+lenormf@users.noreply.github.com> Date: Mon, 27 Apr 2020 07:19:30 +0000 Subject: [PATCH] rc man: Make the use of `$MANPATH` portable --- rc/tools/man.kak | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rc/tools/man.kak b/rc/tools/man.kak index 4879b6e5..af736485 100644 --- a/rc/tools/man.kak +++ b/rc/tools/man.kak @@ -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 []: manpage viewer wrapper