Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add completion script for wireguard's wg-quick #588

Merged
merged 3 commits into from
Oct 13, 2018
Merged

Add completion script for wireguard's wg-quick #588

merged 3 commits into from
Oct 13, 2018

Conversation

Eisfunke
Copy link
Contributor

@Eisfunke Eisfunke commented Aug 4, 2018

This is a simple completion for wg-quick(8), the tool for easlily managing Wireguard VPN tunnels.

I hope it's okay like this, I tried to adhere to the standards, but will gladly change things if you want.

src/_wg-quick Outdated
'down\:"tear down and remove a wireguard interface"'\
'save\:"save configuration of a running wireguard interface"')

_arguments "1:mode:((${modes}))" "2:inferface:(${interfaces})"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You have a typo in interface

src/_wg-quick Outdated
#
# ------------------------------------------------------------------------------

# Take all configuration files (ending with .conf) from /etc/wireguard,
Copy link
Member

@nicoulaj nicoulaj Aug 25, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this can be done by just using: _files -W /etc/wireguard -g "*.conf(:r) (to be tested)

See here for example

@Eisfunke
Copy link
Contributor Author

Thanks for the comments! I fixed the typo and replaced the sed call with _path_files (not using _files to be able to use ^/ to filter out directories).

@nicoulaj
Copy link
Member

LGTM, thanks!

@nicoulaj nicoulaj merged commit 84a820a into zsh-users:master Oct 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants