From 2e7ead42de502148faae3c8d5243680474090f4a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Fri, 8 May 2020 18:45:05 +0200 Subject: [PATCH] completions: zsh: complete command/shell, and its arguments --- completions/zsh/_foot | 6 ++++-- completions/zsh/_footclient | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/completions/zsh/_foot b/completions/zsh/_foot index 066b84f4..ac8e6e8e 100644 --- a/completions/zsh/_foot +++ b/completions/zsh/_foot @@ -1,7 +1,7 @@ #compdef foot _arguments \ - -s \ + -s -S -C \ '(-c --config)'{-c,--config}'[path to configuration file (XDG_CONFIG_HOME/footrc)]:config:_files' \ '(-f --font)'{-f,--font}'[font name and style in fontconfig format (monospace)]:font:->fonts' \ '(-t --term)'{-t,--term}'[value to set the environment variable TERM to (foot)]:term:->terms' \ @@ -17,7 +17,9 @@ _arguments \ '(-l --log-colorize)'{-l,--log-colorize}'[enable or disable colorization of log output on stderr]:logcolor:(never always auto)' \ '(-S --log-no-syslog)'{-s,--log-no-syslog}'[disable syslog logging (server mode only)]' \ '(-v --version)'{-v,--version}'[show the version number and quit]' \ - '(-h --help)'{-h,--help}'[show help message and quit]' + '(-h --help)'{-h,--help}'[show help message and quit]' \ + ':command: _command_names -e' \ + '*::command arguments: _dispatch ${words[1]} ${words[1]}' case ${state} in fonts) diff --git a/completions/zsh/_footclient b/completions/zsh/_footclient index 9da39a30..e406beec 100644 --- a/completions/zsh/_footclient +++ b/completions/zsh/_footclient @@ -1,7 +1,7 @@ #compdef footclient _arguments \ - -s \ + -s -S -C \ '(-t --term)'{-t,--term}'[value to set the environment variable TERM to (foot)]:term:->terms' \ '--title[initial window title]:()' \ '(-a --app-id)'{-a,--app-id}'[value to set the app-id property on the Wayland window to (foot)]:()' \ @@ -11,7 +11,9 @@ _arguments \ '(-s --server-socket)'{-s,--server-socket}'[override the default path to the foot server socket (XDG_RUNTIME_DIR/foot.sock)]:server:_files' \ '(-l --log-colorize)'{-l,--log-colorize}'[enable or disable colorization of log output on stderr]:logcolor:(never always auto)' \ '(-v --version)'{-v,--version}'[show the version number and quit]' \ - '(-h --help)'{-h,--help}'[show help message and quit]' + '(-h --help)'{-h,--help}'[show help message and quit]' \ + ':command: _command_names -e' \ + '*::command arguments: _dispatch ${words[1]} ${words[1]}' case ${state} in terms)