mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-20 20:40:29 +01:00
bash-completion: localize the prev variable
The prev variable is not localzed in the nmcli Bash completion script,
which calls _init_completion.
Even though prev does not appear in the completion script, it should
still be localized. This variable may otherwise appear in the user's
environment and clobber a user-defined variable of the same name, which
is bad.
Localize the prev variable.
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/741
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/882
(cherry picked from commit 5c1181c6f3)
This commit is contained in:
parent
be89b39828
commit
1e0252fa8f
1 changed files with 1 additions and 1 deletions
|
|
@ -27,7 +27,7 @@ _nmcli_array_delete_at()
|
|||
|
||||
_nmcli()
|
||||
{
|
||||
local cur words cword i output
|
||||
local cur prev words cword i output
|
||||
_init_completion || return
|
||||
|
||||
# we don't care about any arguments after the current cursor position
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue