Skip to content

Commit

Permalink
java, pkgadd, sysbench: address shellcheck SC2124
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Mar 26, 2020
1 parent a6e5e99 commit 5757fd4
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion completions/java
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ _java_packages()
# remove packages extension
COMPREPLY=( ${COMPREPLY[@]%/} )
# convert path syntax to package syntax
cur=${COMPREPLY[@]//\//.}
cur="${COMPREPLY[@]//\//.}"
}

# java completion
Expand Down
3 changes: 2 additions & 1 deletion completions/pkgadd
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ _pkgadd ()
else
local pkginst_list
if [[ -d $device ]]; then
local -a tmplist
for filedir in $(/bin/ls -1 $device); do
if [[ -d "$device/$filedir" ]] && [[ -f "$device/$filedir/pkginfo" ]]; then
pkginst_list+=( ${pkginst_list[@]:-} "$filedir" )
tmplist+=( ${tmplist[@]:-} "$filedir" )
fi
done
pkginst_list="${pkginst_list[@]}"
Expand Down
2 changes: 1 addition & 1 deletion completions/sysbench
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ _sysbench()
local opts=$(_parse_help "$1")
if [[ $test ]]; then
local help=( $(_parse_help "$1" "--test=$test help") )
opts="${opts[@]/--test=/} ${help[@]} prepare run cleanup help version"
opts="${opts/--test=/} ${help[@]} prepare run cleanup help version"
fi

if [[ "$cur" == -* || ! $test ]]; then
Expand Down

0 comments on commit 5757fd4

Please sign in to comment.