Skip to content

Commit

Permalink
Bash completions
Browse files Browse the repository at this point in the history
  • Loading branch information
leninalive committed Jan 17, 2024
1 parent 1a74f34 commit a4aeb9e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2015-2020 Jason A. Donenfeld <[email protected]>. All Rights Reserved.

_wg_quick_completion() {
_awg_quick_completion() {
local p i a search_paths old_glob
search_paths=( /etc/wireguard )

Expand Down Expand Up @@ -40,4 +40,4 @@ _wg_quick_completion() {
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
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
# Copyright (C) 2015-2020 Jason A. Donenfeld <[email protected]>. All Rights Reserved.

_wg_completion() {
_awg_completion() {
local a

if [[ $COMP_CWORD -eq 1 ]]; then
Expand Down Expand Up @@ -96,4 +96,4 @@ _wg_completion() {
COMPREPLY+=( $(compgen -W "${words[*]}" -- "${COMP_WORDS[COMP_CWORD]}") )
}

complete -o nosort -F _wg_completion wg
complete -o nosort -F _awg_completion awg

0 comments on commit a4aeb9e

Please sign in to comment.