summaryrefslogtreecommitdiffstats
path: root/completions/zsh/_swaybar
diff options
context:
space:
mode:
authorLibravatar Réouven Assouly <reouvenassouly@yahoo.fr>2019-01-01 16:16:11 +0100
committerLibravatar Brian Ashworth <bosrsf04@gmail.com>2019-01-02 21:38:32 -0500
commitcf00fb2ccc2063fbbd5b72e0d3b8e75697243c3b (patch)
tree396cf56d64b974593ec69110a9418e4b9ff02405 /completions/zsh/_swaybar
parentImplement tiling_drag_threshold (diff)
downloadsway-cf00fb2ccc2063fbbd5b72e0d3b8e75697243c3b.tar.gz
sway-cf00fb2ccc2063fbbd5b72e0d3b8e75697243c3b.tar.zst
sway-cf00fb2ccc2063fbbd5b72e0d3b8e75697243c3b.zip
zsh: update completions
Diffstat (limited to 'completions/zsh/_swaybar')
-rw-r--r--completions/zsh/_swaybar13
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 @@
1#compdef swaybar
2#
3# Completion script for swaybar
4#
5
6local bars=($(swaymsg -t get_bar_config | sed -e '/^\[/,/\]$/{//d;s/^ *"\(.*\)",\?.*$/\1/}'))
7
8_arguments -s \
9 '(-h --help)'{-h,--help}'[Show help message and quit]' \
10 '(-v --version)'{-v,--version}'[Show version and quit]' \
11 '(-s --socket)'{-s,--socket}'[Connect to sway via socket]:filename:_files' \
12 '(-b --bar_id)'{-b,--bar-id}'[Bar ID for which to get the configuration]:filename:($bars)'\
13 '(-d --debug)'{-d,--debug}'[Enable debugging]'