diff options
author | Réouven Assouly <reouvenassouly@yahoo.fr> | 2019-01-01 16:16:11 +0100 |
---|---|---|
committer | Brian Ashworth <bosrsf04@gmail.com> | 2019-01-02 21:38:32 -0500 |
commit | cf00fb2ccc2063fbbd5b72e0d3b8e75697243c3b (patch) | |
tree | 396cf56d64b974593ec69110a9418e4b9ff02405 /completions/zsh/_swaybar | |
parent | 5bf4daf2634929e7c94a6c7e56eda66d4667ca2f (diff) | |
download | sway-cf00fb2ccc2063fbbd5b72e0d3b8e75697243c3b.tar.xz |
zsh: update completions
Diffstat (limited to 'completions/zsh/_swaybar')
-rw-r--r-- | completions/zsh/_swaybar | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/completions/zsh/_swaybar b/completions/zsh/_swaybar new file mode 100644 index 00000000..4fdfdd8a --- /dev/null +++ b/completions/zsh/_swaybar @@ -0,0 +1,13 @@ +#compdef swaybar +# +# Completion script for swaybar +# + +local bars=($(swaymsg -t get_bar_config | sed -e '/^\[/,/\]$/{//d;s/^ *"\(.*\)",\?.*$/\1/}')) + +_arguments -s \ + '(-h --help)'{-h,--help}'[Show help message and quit]' \ + '(-v --version)'{-v,--version}'[Show version and quit]' \ + '(-s --socket)'{-s,--socket}'[Connect to sway via socket]:filename:_files' \ + '(-b --bar_id)'{-b,--bar-id}'[Bar ID for which to get the configuration]:filename:($bars)'\ + '(-d --debug)'{-d,--debug}'[Enable debugging]' |