Skip to content

Commit

Permalink
fix(completions/*): work around localvar_inherit
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Sep 23, 2023
1 parent f51f2f0 commit e3a871d
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 9 deletions.
2 changes: 1 addition & 1 deletion completions/chgrp
Expand Up @@ -16,7 +16,7 @@ _comp_cmd_chgrp()

# options completion
if [[ $cur == -* ]]; then
local w opts
local w opts=""
for w in "${words[@]}"; do
[[ $w == -@(R|-recursive) ]] && opts="-H -L -P" && break
done
Expand Down
2 changes: 1 addition & 1 deletion completions/chown
Expand Up @@ -21,7 +21,7 @@ _comp_cmd_chown()

if [[ $cur == -* ]]; then
# Complete -options
local w opts
local w opts=""
for w in "${words[@]}"; do
[[ $w == -@(R|-recursive) ]] && opts="-H -L -P" && break
done
Expand Down
2 changes: 1 addition & 1 deletion completions/lilo
Expand Up @@ -22,7 +22,7 @@ _comp_cmd_lilo()
;;
-I | -D | -R)
# label completion
local i conf
local i conf=""
for i in "${!words[@]}"; do
if [[ ${words[i]} == -C ]]; then
conf=${words[i + 1]}
Expand Down
4 changes: 2 additions & 2 deletions completions/mdadm
Expand Up @@ -2,7 +2,7 @@

_comp_cmd_mdadm__raid_level()
{
local mode
local mode=""

local noargopts='!(-*|*[CB]*)'
for ((i = 1; i < cword; i++)); do
Expand Down Expand Up @@ -33,7 +33,7 @@ _comp_cmd_mdadm__raid_level()

_comp_cmd_mdadm__raid_layout()
{
local level
local level=""
for ((i = 1; i < cword; i++)); do
if [[ ${words[i]} == -@(l|-level) ]]; then
level=${words[i + 1]}
Expand Down
2 changes: 1 addition & 1 deletion completions/openssl
Expand Up @@ -2,7 +2,7 @@

_comp_cmd_openssl__compgen_sections()
{
local config _i _file
local config="" _i _file

# check if a specific configuration file is used
for ((_i = 2; _i < cword; _i++)); do
Expand Down
2 changes: 1 addition & 1 deletion completions/slapt-src
Expand Up @@ -26,7 +26,7 @@ _comp_cmd_slapt_src()
fi
fi

local i t
local i t=""
# search for last action (-i|-w|-b|-f)
for ((i = ${#words[@]} - 1; i > 0; i--)); do
if [[ ${words[i]} == -@([iwfb]|-install|-show|-build|-fetch) ]]; then
Expand Down
1 change: 1 addition & 0 deletions completions/ssh
Expand Up @@ -259,6 +259,7 @@ _ssh_suboption_check()
# @var[out] configfile Found configfile, if any
_comp_cmd_ssh__configfile()
{
configfile=""
set -- "${words[@]}"
while (($# > 0)); do
if [[ $1 == -F* ]]; then
Expand Down
4 changes: 2 additions & 2 deletions completions/tipc
Expand Up @@ -18,7 +18,7 @@ _comp_cmd_tipc__media()
_comp_cmd_tipc__bearer()
{
local optind=$1
local media i
local media="" i

if _comp_cmd_tipc__media "$optind"; then
return
Expand Down Expand Up @@ -109,7 +109,7 @@ _comp_cmd_tipc()

case "${words[optind]}" in
enable)
local media params
local media="" params
((optind++))

if ((cword < optind + 4)); then
Expand Down

0 comments on commit e3a871d

Please sign in to comment.