0
0
mirror of https://github.com/termux/termux-packages.git synced 2024-12-12 14:13:36 +00:00
termux-packages/packages/bash-completion/completions-man.patch
2024-02-21 15:49:43 +01:00

25 lines
876 B
Diff

diff --git a/completions/man b/completions/man
index b405f084..eaa5b811 100644
--- a/completions/man
+++ b/completions/man
@@ -56,18 +56,7 @@ _comp_cmd_man()
return
fi
- local manpath=$(manpath 2>/dev/null || command man -w 2>/dev/null)
- if [[ ! $manpath ]]; then
- # Note: Both "manpath" and "man -w" may be unavailable, in
- # which case we determine the man paths based on the
- # environment variable MANPATH.
- manpath=:${MANPATH-}:
- # Note: An empty path (represented by two consecutive colons
- # or a preceding/trailing colon) represents the system man
- # paths.
- manpath=${manpath//::/':/usr/share/man:/usr/local/share/man:'}
- manpath=${manpath:1:-1}
- fi
+ local manpath="${MANPATH-@TERMUX_PREFIX@/share/man}"
# determine manual section to search
local sect