aboutsummaryrefslogtreecommitdiffstats
path: root/bash_completion/kerl
diff options
context:
space:
mode:
authorMark Allen <[email protected]>2016-04-06 14:23:35 -0500
committerMark Allen <[email protected]>2016-04-06 14:23:35 -0500
commitc0eb5c857f8c0cc7dae0f8d1e8ba639decb06944 (patch)
tree2f1ea7d0dca10209b0023471d93093745a01b52a /bash_completion/kerl
parent47f6dfff4a43c47c5f12754470110c3964192fb5 (diff)
parent29d7e61222a231f8eaff3b294d0578a511f3f1c6 (diff)
downloadkerl-c0eb5c857f8c0cc7dae0f8d1e8ba639decb06944.tar.gz
kerl-c0eb5c857f8c0cc7dae0f8d1e8ba639decb06944.tar.bz2
kerl-c0eb5c857f8c0cc7dae0f8d1e8ba639decb06944.zip
Merge pull request #106 from fenollp/shellcheck-fixes
Fix most shellcheck warnings/errors
Diffstat (limited to 'bash_completion/kerl')
-rw-r--r--bash_completion/kerl26
1 files changed, 13 insertions, 13 deletions
diff --git a/bash_completion/kerl b/bash_completion/kerl
index 559d844..76c4ad2 100644
--- a/bash_completion/kerl
+++ b/bash_completion/kerl
@@ -1,3 +1,4 @@
+#!/bin/bash
# bash_completion for kerl
_kerl()
@@ -14,33 +15,33 @@ _kerl()
;;
build)
if [ "$COMP_CWORD" -eq 2 ]; then
- if [ -f "$HOME/.kerl/otp_releases" ]; then
- RELEASES=`cat "$HOME/.kerl/otp_releases"`
+ if [ -f "$HOME"/.kerl/otp_releases ]; then
+ RELEASES=$(cat "$HOME"/.kerl/otp_releases)
fi
COMPREPLY=( $( compgen -W "git $RELEASES" -- "$cur") )
else
- if [ -f "$HOME/.kerl/otp_builds" ]; then
- BUILDS=`cat "$HOME/.kerl/otp_builds" | cut -d "," -f 2`
+ if [ -f "$HOME"/.kerl/otp_builds ]; then
+ BUILDS=$(cut -d ',' -f 2 "$HOME"/.kerl/otp_builds)
fi
COMPREPLY=( $( compgen -W "$BUILDS" -- "$cur") )
fi
;;
installation)
- if [ -f "$HOME/.kerl/otp_installations" ]; then
- PATHS=`cat "$HOME/.kerl/otp_installations" | cut -d " " -f 2`
+ if [ -f "$HOME"/.kerl/otp_installations ]; then
+ PATHS=$(cut -d ' ' -f 2 "$HOME"/.kerl/otp_installations)
fi
COMPREPLY=( $( compgen -W "$PATHS" -- "$cur") )
;;
install)
- if [ -f "$HOME/.kerl/otp_builds" ]; then
- BUILDS=`cat "$HOME/.kerl/otp_builds" | cut -d "," -f 2`
+ if [ -f "$HOME"/.kerl/otp_builds ]; then
+ BUILDS=$(cut -d ',' -f 2 "$HOME"/.kerl/otp_builds)
fi
COMPREPLY=( $( compgen -W "$BUILDS" -- "$cur") )
;;
deploy)
if [ "$COMP_CWORD" -eq 3 ]; then
- if [ -f "$HOME/.kerl/otp_installations" ]; then
- PATHS=`cat "$HOME/.kerl/otp_installations" | cut -d " " -f 2`
+ if [ -f "$HOME"/.kerl/otp_installations ]; then
+ PATHS=$(cut -d ' ' -f 2 "$HOME"/.kerl/otp_installations)
fi
fi
COMPREPLY=( $( compgen -W "$PATHS" -- "$cur") )
@@ -53,8 +54,8 @@ _kerl()
;;
*)
if [ "$COMP_CWORD" -eq 3 ]; then
- if [ -f "$HOME/.kerl/otp_builds" ]; then
- BUILDS=`cat "$HOME/.kerl/otp_builds" | cut -d "," -f 2`
+ if [ -f "$HOME"/.kerl/otp_builds ]; then
+ BUILDS=$(cut -d ',' -f 2 "$HOME"/.kerl/otp_builds)
fi
if [ -n "$BUILDS" ]; then
for b in $BUILDS; do
@@ -69,4 +70,3 @@ _kerl()
esac
}
complete -F _kerl kerl
-