Skip to content

Commit 8adb82b

Browse files
authored
Merge pull request #2378 from BarbUk/lint
2 parents 39f60ff + fd1f2a0 commit 8adb82b

16 files changed

Lines changed: 35 additions & 35 deletions

bash_it.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ BASH_IT_LOG_PREFIX="core: main: "
1414
: "${BASH_IT:=${BASH_SOURCE%/*}}"
1515
: "${BASH_IT_CUSTOM:=${BASH_IT}/custom}"
1616
: "${CUSTOM_THEME_DIR:="${BASH_IT_CUSTOM}/themes"}"
17-
: "${BASH_IT_BASHRC:=${BASH_SOURCE[${#BASH_SOURCE[@]} - 1]}}"
17+
: "${BASH_IT_BASHRC:=${BASH_SOURCE[${#BASH_SOURCE[@]}-1]}}"
1818

1919
# Load composure first, so we support function metadata
2020
# shellcheck source-path=SCRIPTDIR/vendor/github.com/erichs/composure

completion/available/bash-it.completion.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function _bash-it() {
1515
local cur prev verb file_type candidates suffix
1616
COMPREPLY=()
1717
cur="${COMP_WORDS[COMP_CWORD]}"
18-
prev="${COMP_WORDS[COMP_CWORD - 1]}"
18+
prev="${COMP_WORDS[COMP_CWORD-1]}"
1919
verb="${COMP_WORDS[1]}"
2020
file_type="${COMP_WORDS[2]:-}"
2121
candidates=('disable' 'enable' 'help' 'migrate' 'reload' 'restart' 'preview' 'profile' 'doctor' 'search' 'show' 'update' 'version')

completion/available/dmidecode.completion.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ _bash-it-completion-helper-necessary dmidecode || :
77
_bash-it-completion-helper-sufficient dmidecode || return
88

99
function _dmidecode() {
10-
local prev="${COMP_WORDS[COMP_CWORD - 1]}"
10+
local prev="${COMP_WORDS[COMP_CWORD-1]}"
1111

1212
case $prev in
1313
-s | --string | -t | --type)

completion/available/docker-compose.completion.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ __docker_compose_map_key_of_current_option() {
8585
key=${cur%=*}
8686
glob_pos=$((cword - 1))
8787
elif [ "$prev" = "=" ]; then
88-
key=${words[$cword - 2]} # key=value case
88+
key=${words[$cword-2]} # key=value case
8989
glob_pos=$((cword - 3))
9090
else
9191
return

completion/available/gem.completion.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ url "https://rubygems.org/"
66

77
__gem_completion() {
88
local cur=${COMP_WORDS[COMP_CWORD]}
9-
local prev=${COMP_WORDS[COMP_CWORD - 1]}
9+
local prev=${COMP_WORDS[COMP_CWORD-1]}
1010
case $prev in
1111
install)
1212
# list the remote gems and add to completion

completion/available/notify-send.completion.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ _bash-it-completion-helper-necessary notify-send || :
77
_bash-it-completion-helper-sufficient notify-send || return
88

99
function _notify-send() {
10-
local prev="${COMP_WORDS[COMP_CWORD - 1]}"
10+
local prev="${COMP_WORDS[COMP_CWORD-1]}"
1111

1212
case $prev in
1313
-u | --urgency)

completion/available/salt.completion.bash

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -49,12 +49,12 @@ _salt() {
4949
local cur prev opts _salt_grains _salt_coms pprev ppprev
5050
COMPREPLY=()
5151
cur="${COMP_WORDS[COMP_CWORD]}"
52-
prev="${COMP_WORDS[COMP_CWORD - 1]}"
52+
prev="${COMP_WORDS[COMP_CWORD-1]}"
5353
if [ "${COMP_CWORD}" -gt 2 ]; then
54-
pprev="${COMP_WORDS[COMP_CWORD - 2]}"
54+
pprev="${COMP_WORDS[COMP_CWORD-2]}"
5555
fi
5656
if [ "${COMP_CWORD}" -gt 3 ]; then
57-
ppprev="${COMP_WORDS[COMP_CWORD - 3]}"
57+
ppprev="${COMP_WORDS[COMP_CWORD-3]}"
5858
fi
5959

6060
opts="-h --help -d --doc --documentation --version --versions-report -c \
@@ -145,7 +145,7 @@ _saltkey() {
145145
local cur prev opts prev pprev
146146
COMPREPLY=()
147147
cur="${COMP_WORDS[COMP_CWORD]}"
148-
prev="${COMP_WORDS[COMP_CWORD - 1]}"
148+
prev="${COMP_WORDS[COMP_CWORD-1]}"
149149
opts="-c --config-dir= -h --help --version --versions-report -q --quiet \
150150
-y --yes --gen-keys= --gen-keys-dir= --keysize= --key-logfile= \
151151
-l --list= -L --list-all -a --accept= -A --accept-all \
@@ -154,10 +154,10 @@ _saltkey() {
154154
--out=pprint --out=yaml --out=overstatestage --out=json --out=raw \
155155
--out=highstate --out=key --out=txt --no-color --out-indent= "
156156
if [ "${COMP_CWORD}" -gt 2 ]; then
157-
pprev="${COMP_WORDS[COMP_CWORD - 2]}"
157+
pprev="${COMP_WORDS[COMP_CWORD-2]}"
158158
fi
159159
if [ "${COMP_CWORD}" -gt 3 ]; then
160-
ppprev="${COMP_WORDS[COMP_CWORD - 3]}"
160+
ppprev="${COMP_WORDS[COMP_CWORD-3]}"
161161
fi
162162
if [[ "${cur}" == -* ]]; then
163163
COMPREPLY=($(compgen -W "${opts}" -- "${cur}"))
@@ -232,16 +232,16 @@ _saltcall() {
232232
local cur prev opts _salt_coms pprev ppprev
233233
COMPREPLY=()
234234
cur="${COMP_WORDS[COMP_CWORD]}"
235-
prev="${COMP_WORDS[COMP_CWORD - 1]}"
235+
prev="${COMP_WORDS[COMP_CWORD-1]}"
236236
opts="-h --help -d --doc --documentation --version --versions-report \
237237
-m --module-dirs= -g --grains --return= --local -c --config-dir= -l --log-level= \
238238
--out=pprint --out=yaml --out=overstatestage --out=json --out=raw \
239239
--out=highstate --out=key --out=txt --no-color --out-indent= "
240240
if [ "${COMP_CWORD}" -gt 2 ]; then
241-
pprev="${COMP_WORDS[COMP_CWORD - 2]}"
241+
pprev="${COMP_WORDS[COMP_CWORD-2]}"
242242
fi
243243
if [ "${COMP_CWORD}" -gt 3 ]; then
244-
ppprev="${COMP_WORDS[COMP_CWORD - 3]}"
244+
ppprev="${COMP_WORDS[COMP_CWORD-3]}"
245245
fi
246246
if [[ "${cur}" == -* ]]; then
247247
COMPREPLY=($(compgen -W "${opts}" -- "${cur}"))
@@ -284,7 +284,7 @@ _saltcp() {
284284
local cur prev opts prefpart helper filt pprev ppprev
285285
COMPREPLY=()
286286
cur="${COMP_WORDS[COMP_CWORD]}"
287-
prev="${COMP_WORDS[COMP_CWORD - 1]}"
287+
prev="${COMP_WORDS[COMP_CWORD-1]}"
288288
opts="-t --timeout= -s --static -b --batch= --batch-size= \
289289
-h --help --version --versions-report -c --config-dir= \
290290
-E --pcre -L --list -G --grain --grain-pcre -N --nodegroup \

completion/available/sdkman.completion.bash

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function _sdkman_complete() {
1111
if [ "$COMP_CWORD" -eq 1 ]; then
1212
while IFS='' read -r line; do COMPREPLY+=("$line"); done < <(compgen -W "install uninstall rm list ls use default home env current upgrade ug version broadcast help offline selfupdate update flush" -- "${COMP_WORDS[COMP_CWORD]}")
1313
elif [ "$COMP_CWORD" -eq 2 ]; then
14-
case "${COMP_WORDS[COMP_CWORD - 1]}" in
14+
case "${COMP_WORDS[COMP_CWORD-1]}" in
1515
"install" | "i" | "uninstall" | "rm" | "list" | "ls" | "use" | "u" | "default" | "d" | "home" | "h" | "current" | "c" | "upgrade" | "ug")
1616
CANDIDATES="${SDKMAN_CANDIDATES_CSV//,/${IFS:0:1}}"
1717
while IFS='' read -r line; do COMPREPLY+=("$line"); done < <(compgen -W "$CANDIDATES" -- "${COMP_WORDS[COMP_CWORD]}")
@@ -32,13 +32,13 @@ function _sdkman_complete() {
3232

3333
esac
3434
elif [ "$COMP_CWORD" -eq 3 ]; then
35-
case "${COMP_WORDS[COMP_CWORD - 2]}" in
35+
case "${COMP_WORDS[COMP_CWORD-2]}" in
3636
"uninstall" | "rm" | "use" | "u" | "default" | "d" | "home" | "h")
37-
_sdkman_candidate_local_versions "${COMP_WORDS[COMP_CWORD - 1]}"
37+
_sdkman_candidate_local_versions "${COMP_WORDS[COMP_CWORD-1]}"
3838
while IFS='' read -r line; do COMPREPLY+=("$line"); done < <(compgen -W "$CANDIDATE_VERSIONS" -- "${COMP_WORDS[COMP_CWORD]}")
3939
;;
4040
"install" | "i")
41-
_sdkman_candidate_all_versions "${COMP_WORDS[COMP_CWORD - 1]}"
41+
_sdkman_candidate_all_versions "${COMP_WORDS[COMP_CWORD-1]}"
4242
while IFS='' read -r line; do COMPREPLY+=("$line"); done < <(compgen -W "$CANDIDATE_VERSIONS" -- "${COMP_WORDS[COMP_CWORD]}")
4343
;;
4444
*) ;;

completion/available/test_kitchen.completion.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ __kitchen_instance_list() {
1111

1212
__kitchen_options() {
1313
cur="${COMP_WORDS[COMP_CWORD]}"
14-
prev="${COMP_WORDS[COMP_CWORD - 1]}"
14+
prev="${COMP_WORDS[COMP_CWORD-1]}"
1515
COMPREPLY=()
1616

1717
case $prev in

completion/available/tmux.completion.bash

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ _tmux() {
6666
local i cmd cmd_index option option_index
6767
COMPREPLY=()
6868
cur="${COMP_WORDS[COMP_CWORD]}"
69-
prev="${COMP_WORDS[COMP_CWORD - 1]}"
69+
prev="${COMP_WORDS[COMP_CWORD-1]}"
7070

7171
if [[ "${prev}" == -f ]]; then
7272
_tmux_filedir

0 commit comments

Comments
 (0)