aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLatchezar Tzvetkoff <[email protected]>2018-08-06 09:10:16 +0300
committerPierre Fenoll <[email protected]>2018-08-06 08:10:16 +0200
commit77c27ac999ed0f9bd013f5e2403233b9d31feafe (patch)
tree89b37c1b1b94e2c44e46386523ae061a6c1c50b0
parent8de423bb3196777fea5a1acfbc32f273adf1069a (diff)
downloadkerl-77c27ac999ed0f9bd013f5e2403233b9d31feafe.tar.gz
kerl-77c27ac999ed0f9bd013f5e2403233b9d31feafe.tar.bz2
kerl-77c27ac999ed0f9bd013f5e2403233b9d31feafe.zip
Disable SC2207 for Bash completion (#296)
SC2207 suggests to use `mapfile` or `read -a`. `mapfile` was added in Bash 4, while `read -a` only reads the first line from a file, so both are no go.
-rw-r--r--bash_completion/kerl10
1 files changed, 10 insertions, 0 deletions
diff --git a/bash_completion/kerl b/bash_completion/kerl
index 18f403e..6822734 100644
--- a/bash_completion/kerl
+++ b/bash_completion/kerl
@@ -12,9 +12,11 @@ _kerl()
case $prev in
kerl)
+ # shellcheck disable=SC2207
COMPREPLY=($(compgen -W 'build install update list delete active path status' -- "$cur"))
;;
list)
+ # shellcheck disable=SC2207
COMPREPLY=($(compgen -W 'releases builds installations' -- "$cur"))
;;
build)
@@ -22,11 +24,13 @@ _kerl()
if [ -f "$HOME"/.kerl/otp_releases ]; then
RELEASES=$(cat "$HOME"/.kerl/otp_releases)
fi
+ # shellcheck disable=SC2207
COMPREPLY=($(compgen -W "git $RELEASES" -- "$cur"))
else
if [ -f "$HOME"/.kerl/otp_builds ]; then
BUILDS=$(cut -d ',' -f 2 "$HOME"/.kerl/otp_builds)
fi
+ # shellcheck disable=SC2207
COMPREPLY=($(compgen -W "$BUILDS" -- "$cur"))
fi
;;
@@ -34,12 +38,14 @@ _kerl()
if [ -f "$HOME"/.kerl/otp_installations ]; then
PATHS=$(cut -d ' ' -f 2 "$HOME"/.kerl/otp_installations)
fi
+ # shellcheck disable=SC2207
COMPREPLY=($(compgen -W "$PATHS" -- "$cur"))
;;
install)
if [ -f "$HOME"/.kerl/otp_builds ]; then
BUILDS=$(cut -d ',' -f 2 "$HOME"/.kerl/otp_builds)
fi
+ # shellcheck disable=SC2207
COMPREPLY=($(compgen -W "$BUILDS" -- "$cur"))
;;
path)
@@ -47,6 +53,7 @@ _kerl()
if [ -f "$INSTALL_LIST" ]; then
NAMES=$(cut -d ' ' -f 2 "$INSTALL_LIST" | xargs basename)
fi
+ # shellcheck disable=SC2207
COMPREPLY=($(compgen -W "$NAMES" -- "$cur"))
;;
deploy)
@@ -55,12 +62,15 @@ _kerl()
PATHS=$(cut -d ' ' -f 2 "$HOME"/.kerl/otp_installations)
fi
fi
+ # shellcheck disable=SC2207
COMPREPLY=($(compgen -W "$PATHS" -- "$cur"))
;;
delete)
+ # shellcheck disable=SC2207
COMPREPLY=($(compgen -W 'build installation' -- "$cur"))
;;
update)
+ # shellcheck disable=SC2207
COMPREPLY=($(compgen -W 'releases' -- "$cur"))
;;
*)