diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2020-09-22 16:57:52 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2020-09-22 16:58:08 -0700 |
commit | 80af1600366507c0139e9ae4494755612384476c (patch) | |
tree | fb3857c5a617821e2286f83b61e85321821944e4 /data | |
parent | 87248d9020c471f43760bba339eff87addfc424f (diff) | |
download | meson-80af1600366507c0139e9ae4494755612384476c.zip meson-80af1600366507c0139e9ae4494755612384476c.tar.gz meson-80af1600366507c0139e9ae4494755612384476c.tar.bz2 |
zsh: add meson dist completions
Diffstat (limited to 'data')
-rw-r--r-- | data/shell-completions/zsh/_meson | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/data/shell-completions/zsh/_meson b/data/shell-completions/zsh/_meson index 3a92f27..2d58685 100644 --- a/data/shell-completions/zsh/_meson +++ b/data/shell-completions/zsh/_meson @@ -32,6 +32,7 @@ local -i ret local __meson_backends="(ninja xcode ${(j. .)${:-vs{,2010,2015,2017}}})" local __meson_build_types="(plain debug debugoptimized minsize release)" local __meson_wrap_modes="(WrapMode.{default,nofallback,nodownload,forcefallback})" +local __meson_dist_formats=("xztar" "gztar" "zip") local -a __meson_common=( '--prefix=[installation prefix]: :_directories' '--bindir=[executable directory]: :_directories' @@ -69,10 +70,11 @@ local -a __meson_common=( ) local -a meson_commands=( -'setup:set up a build directory' 'configure:configure a project' -'test:run tests' +'dist:generate release archive' 'introspect:query project properties' +'setup:set up a build directory' +'test:run tests' 'wrap:manage source dependencies' ) @@ -205,6 +207,20 @@ _arguments \ # TODO } +(( $+functions[_meson-dist] )) || _meson-dist() { + local curcontext="$curcontext" + local -a specs=( + '-C[change into this directory before running]:target dir:_directories' + '--formats=[comma seperated list of archive types to create]:archive formats:_values -s , format '"$__meson_dist_formats" + '--include-subprojects[Include source code of subprojects that have been used fo rhte build]' + '--no-tests[Do not build and test generated packages]' + ) +_arguments \ + '(: -)'{'--help','-h'}'[show a help message and quit]' \ + "${(@)specs}" +} + + if [[ $service != meson ]]; then _call_function ret _$service return ret |