From 7d28da50066601807b6790bbd77e2d8785e46884 Mon Sep 17 00:00:00 2001 From: Craig Barnes Date: Tue, 10 Jan 2023 18:34:25 +0000 Subject: Use "command -v" instead of "which" in bash completion scripts The former is a built-in command in bash, whereas the latter is an external command and isn't always necessarily available. --- completions/bash/footclient | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'completions/bash/footclient') diff --git a/completions/bash/footclient b/completions/bash/footclient index b672c247..0381e8a0 100644 --- a/completions/bash/footclient +++ b/completions/bash/footclient @@ -57,7 +57,7 @@ _footclient() compopt -o dirnames elif [[ ${prev} == '--term' ]] ; then # check if toe is available - which toe > /dev/null || return 1 + command -v toe > /dev/null || return 1 COMPREPLY=( $(compgen -W "$(toe -a | awk '$1 ~ /[+]/ {next}; {print $1}')" -- ${cur}) ) elif [[ ${prev} == '--log-level' ]] ; then COMPREPLY=( $(compgen -W "none error warning info" -- ${cur}) ) -- cgit v1.3