Skip to content

Commit

Permalink
bash_completion, java, tipc: for loop whitespace consistency tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Apr 25, 2020
1 parent b147516 commit 3abbd23
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions bash_completion
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ __get_cword_at_cursor_by_ref()
# Cursor not at position 0 and not leaded by just space(s)?
if [[ $index -gt 0 && ( $lead && ${lead//[[:space:]]} ) ]]; then
cur=$COMP_LINE
for (( i = 0; i <= cword; ++i )); do
for (( i=0; i <= cword; ++i )); do
while [[
# Current word fits in $cur?
${#cur} -ge ${#words[i]} &&
Expand Down Expand Up @@ -434,7 +434,7 @@ _get_cword()
local i
local cur="$COMP_LINE"
local index="$COMP_POINT"
for (( i = 0; i <= cword; ++i )); do
for (( i=0; i <= cword; ++i )); do
while [[
# Current word fits in $cur?
"${#cur}" -ge ${#words[i]} &&
Expand Down
2 changes: 1 addition & 1 deletion completions/java
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ _java()

local i

for ((i=1; i < cword; i++)); do
for (( i=1; i < cword; i++ )); do
case ${words[i]} in
-cp|-classpath)
((i++)) # skip the classpath string.
Expand Down
4 changes: 2 additions & 2 deletions completions/tipc
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ _tipc_bearer() {
return
fi

for ((i = 0; i < cword; i++)); do
for (( i=0; i < cword; i++ )); do
if [[ ${words[i]} == 'media' ]]; then
media=${words[i+1]}
fi
Expand Down Expand Up @@ -111,7 +111,7 @@ _tipc()
return
fi

for ((i = 0; i < cword; i++)); do
for (( i=0; i < cword; i++ )); do
if [[ ${words[i]} == 'media' ]]; then
media=${words[i+1]}
fi
Expand Down

0 comments on commit 3abbd23

Please sign in to comment.