mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Roland Hieber <rhi@pengutronix.de>
To: ptxdist@pengutronix.de
Cc: Roland Hieber <rhi@pengutronix.de>
Subject: [ptxdist] [PATCH] bash_completion: use '_have' instead of 'have'
Date: Wed, 27 Nov 2019 15:10:51 +0100	[thread overview]
Message-ID: <20191127141051.20699-1-rhi@pengutronix.de> (raw)

'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>
---
 scripts/bash_completion | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/bash_completion b/scripts/bash_completion
index e0dd3428455c..deb14ad0cb8a 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
-- 
2.24.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

                 reply	other threads:[~2019-11-27 14:10 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20191127141051.20699-1-rhi@pengutronix.de \
    --to=rhi@pengutronix.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox