mirror of
https://github.com/zsh-users/zsh-completions.git
synced 2026-09-17 16:00:19 +00:00
Make plugin compatible with zsh plugin standard
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#compdef wg-quick
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for wg-quick (a script for easy managemant of wireguard
|
||||
# VPN tunnels) (https://www.wireguard.com/)
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Nicolas Lenz <nicolas@eisfunke.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
# The possible modes
|
||||
local modes=('up\:"bring a wireguard interface up"'\
|
||||
'down\:"tear down and remove a wireguard interface"'\
|
||||
'save\:"save configuration of a running wireguard interface"')
|
||||
|
||||
# 1: Complete mode
|
||||
# 2: Complete interface with all .conf files in /etc/wireguard without the filename extension.
|
||||
_arguments "1:mode:((${modes}))"\
|
||||
'2:interface:_path_files -W /etc/wireguard -g "*.conf(^/:r)"'
|
||||
Reference in New Issue
Block a user