bash-completion: Fix man completion (fixes #1056)
authorFredrik Fornwall <fredrik@fornwall.net>
Thu, 25 May 2017 20:16:35 +0000 (22:16 +0200)
committerFredrik Fornwall <fredrik@fornwall.net>
Thu, 25 May 2017 20:17:10 +0000 (22:17 +0200)
packages/bash-completion/build.sh
packages/bash-completion/completions-man.patch [new file with mode: 0644]

index f3c2157..8fba6d3 100644 (file)
@@ -1,6 +1,7 @@
 TERMUX_PKG_HOMEPAGE=https://github.com/scop/bash-completion
 TERMUX_PKG_DESCRIPTION="Programmable completion for the bash shell"
 TERMUX_PKG_VERSION=2.5
+TERMUX_PKG_REVISION=1
 TERMUX_PKG_SRCURL=https://github.com/scop/bash-completion/releases/download/${TERMUX_PKG_VERSION}/bash-completion-${TERMUX_PKG_VERSION}.tar.xz
 TERMUX_PKG_SHA256=b0b9540c65532825eca030f1241731383f89b2b65e80f3492c5dd2f0438c95cf
 TERMUX_PKG_FOLDERNAME=bash-completion-${TERMUX_PKG_VERSION}
diff --git a/packages/bash-completion/completions-man.patch b/packages/bash-completion/completions-man.patch
new file mode 100644 (file)
index 0000000..cebe2af
--- /dev/null
@@ -0,0 +1,14 @@
+diff -u -r ../bash-completion-2.5/completions/man ./completions/man
+--- ../bash-completion-2.5/completions/man     2016-09-04 17:26:26.000000000 +0200
++++ ./completions/man  2017-05-25 21:59:14.472791735 +0200
+@@ -57,9 +57,7 @@
+     fi
+     local manpath="$MANPATH"
+-    [[ -z $manpath ]] && \
+-        manpath=$( manpath 2>/dev/null || command man -w 2>/dev/null )
+-    [[ -z $manpath ]] && manpath="/usr/share/man:/usr/local/share/man"
++    [[ -z $manpath ]] && manpath="@TERMUX_PREFIX@/share/man"
+     # determine manual section to search
+     local sect