Skip to content

Commit

Permalink
fix(getent): work around localvar_inherit
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Aug 12, 2023
1 parent ecd1384 commit a12f438
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions completions/getent
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ _comp_cmd_getent()
_comp_initialize -s -- "$@" || return

local noargopts='!(-*|*[s]*)'
local i db has_db=""
local i db="" has_db=""
for ((i = 1; i < cword; i++)); do
# shellcheck disable=SC2254
case ${words[i]} in
Expand All @@ -27,7 +27,7 @@ _comp_cmd_getent()
esac
done

case ${db-} in
case $db in
passwd)
_comp_compgen -- -u
return
Expand Down

0 comments on commit a12f438

Please sign in to comment.