summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland Hieber <rhi@pengutronix.de>2019-11-27 15:10:51 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2019-11-28 17:25:41 +0100
commitf0e04ab22f1627fb237cbbaf253c3e02c50449dd (patch)
tree274cccaa7a0ea067642a344eaf213d0aba3734aa
parent9888209650c09875d2082c3f075d764f992f8aee (diff)
downloadptxdist-f0e04ab22f1627fb237cbbaf253c3e02c50449dd.tar.gz
ptxdist-f0e04ab22f1627fb237cbbaf253c3e02c50449dd.tar.xz
bash_completion: use '_have' instead of 'have'
'have' was deprecated upstream about 8 years ago. [0] Also, since it is only available inside of /etc/bash_completion [1], using it makes it harder to (re)load existing completions in a running shell: $ . ~/.bash_completion.d/ptxdist bash: have: command not found Use '_have' instead, which does not have these problems. [0]: https://github.com/scop/bash-completion/commit/20c05b43b6e44b [1]: https://github.com/scop/bash-completion/blob/31b5cbc8016b18/bash_completion#L2158 Signed-off-by: Roland Hieber <rhi@pengutronix.de> Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
-rw-r--r--scripts/bash_completion2
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/bash_completion b/scripts/bash_completion
index e0dd34284..deb14ad0c 100644
--- a/scripts/bash_completion
+++ b/scripts/bash_completion
@@ -5,7 +5,7 @@
# part of PTXdist, so same licence.
#
-if have ptxdist; then
+if _have ptxdist; then
declare -a _ptxdist_completion_opts
declare -a _ptxdist_completion_cmds