diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2020-09-23 09:16:27 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2020-09-23 09:16:27 -0700 |
commit | c6f7588afaace7302d92c617dfaf17ca82e9ebc5 (patch) | |
tree | ca649733ef0d29241ae6345ca6d98af054329f55 /data/shell-completions | |
parent | a137cd0bfba090ebcf53c6645dd8bfdefea557fc (diff) | |
download | meson-c6f7588afaace7302d92c617dfaf17ca82e9ebc5.zip meson-c6f7588afaace7302d92c617dfaf17ca82e9ebc5.tar.gz meson-c6f7588afaace7302d92c617dfaf17ca82e9ebc5.tar.bz2 |
zsh: Add completions for meson init
Diffstat (limited to 'data/shell-completions')
-rw-r--r-- | data/shell-completions/zsh/_meson | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/data/shell-completions/zsh/_meson b/data/shell-completions/zsh/_meson index 4679e0d..7d1f3a2 100644 --- a/data/shell-completions/zsh/_meson +++ b/data/shell-completions/zsh/_meson @@ -73,8 +73,9 @@ local -a __meson_common=( local -a meson_commands=( 'configure:configure a project' 'dist:generate release archive' -'introspect:query project properties' +'init:create a new project' 'install:install one more more targets' +'introspect:query project properties' 'setup:set up a build directory' 'test:run tests' 'wrap:manage source dependencies' @@ -218,6 +219,25 @@ _arguments \ "${(@)specs}" } +(( $+functions[_meson-init] )) || _meson-init() { + local curcontext="$curcontext" + local -a specs=( + "$__meson_cd" + '(-n --name)'{'-n','--name'}'=[the name of the project (defaults to directory name)]' + '(-e --executable)'{'-e','--executable'}'=[the name of the executable target to create (defaults to project name)]' + '(-d --deps)'{'-d','--deps'}'=[comma seperated list of dependencies]' + '(-l --language)'{'-l','--language'}'=[comma seperated list of languages (autodetected based on sources if unset)]:languages:_values , (c cpp cs cuda d fortran java objc objcpp rust)' + '(-b --build)'{'-b','--build'}'[build the project immediately after generation]' + '--builddir=[directory for building]:directory:_directories' + '(-f --force)'{'-f','--force'}'[overwrite any existing files and directories]' + '(-t --type)'{'-t','--type'}'=[project type, defaults to executable]:type:(executable library)' + '(-v --version)'{'-v','--version'}'[print the meson version and exit]' + ) +_arguments \ + '(: -)'{'--help','-h'}'[show a help message and quit]' \ + "${(@)specs}" +} + (( $+functions[_meson-wrap] )) || _meson-wrap() { # TODO } @@ -226,7 +246,7 @@ _arguments \ local curcontext="$curcontext" local -a specs=( '--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]' + '--include-subprojects[Include source code of subprojects that have been used for the build]' '--no-tests[Do not build and test generated packages]' "$__meson_cd" ) |