mirror of
https://github.com/amnezia-vpn/amneziawg-tools.git
synced 2025-08-02 17:42:50 +02:00
Bash completions
This commit is contained in:
parent
1a74f346c1
commit
a4aeb9e195
2 changed files with 4 additions and 4 deletions
|
@ -1,7 +1,7 @@
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
# Copyright (C) 2015-2020 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
|
# Copyright (C) 2015-2020 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
|
||||||
|
|
||||||
_wg_quick_completion() {
|
_awg_quick_completion() {
|
||||||
local p i a search_paths old_glob
|
local p i a search_paths old_glob
|
||||||
search_paths=( /etc/wireguard )
|
search_paths=( /etc/wireguard )
|
||||||
|
|
||||||
|
@ -40,4 +40,4 @@ _wg_quick_completion() {
|
||||||
eval "$old_glob"
|
eval "$old_glob"
|
||||||
}
|
}
|
||||||
|
|
||||||
complete -o filenames -o nosort -F _wg_quick_completion wg-quick
|
complete -o filenames -o nosort -F _awg_quick_completion awg-quick
|
|
@ -1,7 +1,7 @@
|
||||||
# SPDX-License-Identifier: GPL-2.0
|
# SPDX-License-Identifier: GPL-2.0
|
||||||
# Copyright (C) 2015-2020 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
|
# Copyright (C) 2015-2020 Jason A. Donenfeld <Jason@zx2c4.com>. All Rights Reserved.
|
||||||
|
|
||||||
_wg_completion() {
|
_awg_completion() {
|
||||||
local a
|
local a
|
||||||
|
|
||||||
if [[ $COMP_CWORD -eq 1 ]]; then
|
if [[ $COMP_CWORD -eq 1 ]]; then
|
||||||
|
@ -96,4 +96,4 @@ _wg_completion() {
|
||||||
COMPREPLY+=( $(compgen -W "${words[*]}" -- "${COMP_WORDS[COMP_CWORD]}") )
|
COMPREPLY+=( $(compgen -W "${words[*]}" -- "${COMP_WORDS[COMP_CWORD]}") )
|
||||||
}
|
}
|
||||||
|
|
||||||
complete -o nosort -F _wg_completion wg
|
complete -o nosort -F _awg_completion awg
|
Loading…
Add table
Reference in a new issue