diff options
author | Emil Velikov <emil.velikov@collabora.com> | 2021-07-10 20:10:43 +0100 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2021-07-12 18:46:26 +0100 |
commit | a2928750d75b0141fddfb3b52e39b6c241c2b4ac (patch) | |
tree | 947d1c725834a88892f18995ffcbb55d663a7fe5 | |
parent | b18866a9424745507da9fc6dc5b0e53becef2ab2 (diff) | |
download | waffle-a2928750d75b0141fddfb3b52e39b6c241c2b4ac.tar.gz |
wflinfo: add zsh completion
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
-rw-r--r-- | meson.build | 3 | ||||
-rw-r--r-- | shell-completion/zsh/_wflinfo | 17 |
2 files changed, 20 insertions, 0 deletions
diff --git a/meson.build b/meson.build index 482e878..b7b7456 100644 --- a/meson.build +++ b/meson.build @@ -144,6 +144,9 @@ else endif install_data('shell-completion/bash/wflinfo', install_dir : bashcompletiondir) +zshcompletiondir = join_paths(get_option('datadir'), 'zsh/site-functions') +install_data('shell-completion/zsh/_wflinfo', install_dir : zshcompletiondir) + # Set pre-processor flags if build_wgl add_project_arguments('-DWAFFLE_HAS_WGL', language : ['c', 'cpp']) diff --git a/shell-completion/zsh/_wflinfo b/shell-completion/zsh/_wflinfo new file mode 100644 index 0000000..812603f --- /dev/null +++ b/shell-completion/zsh/_wflinfo @@ -0,0 +1,17 @@ +#compdef wflinfo + +# first two are required, the rest optional... +_arguments \ + {-p,--platform}'[Platform type]:platform:(( + android cgl gbm glx surfaceless_egl sl wayland wgl x11_egl + ))' \ + {-a,--api}'[API type]:api:(gl gles1 gles2 gles3)' \ + {-V,--version}'[API version]:version:(( + 1.{0..5} 2.{0..1} 3.{0..3} 4.{0..6} + ))' \ + '--profile[OpenGL profile]:profile:(core compat none)' \ + {-v,--verbose}'[Print more information]' \ + '--forward-compatible[Create a forward-compatible context]' \ + '--debug-context[Create a debug context]' \ + {-f,--format}'[Output format, default original]:format:(original json)' \ + {-h,--help}'[Print wflinfo usage information]' |