zsh: Add completions for meson compile

pull/7776/head
Dylan Baker 4 years ago
parent 9f893384db
commit 1b63dcc531
  1. 16
      data/shell-completions/zsh/_meson

@ -80,6 +80,7 @@ local -a meson_commands=(
'test:run tests'
'wrap:manage source dependencies'
'subprojects:manage subprojects'
'compile:Build the project'
)
(( $+functions[__meson_is_build_dir] )) || __meson_is_build_dir() {
@ -383,6 +384,21 @@ _arguments \
}
(( $+functions[_meson-compile] )) || _meson-compile() {
local curcontext="$curcontext"
local -a specs=(
"$__meson_cd"
'--clean[Clean the build directory]'
'(-j --jobs)'{'-j','--jobs'}'=[the number fo work jobs to run (if supported)]:_guard "[0-9]#" "number of jobs"'
'(-l --load-averate)'{'-l','--load-average'}'=[the system load average to try to maintain (if supported)]:_guard "[0-9]#" "load average"'
'(-v --verbose)'{'-v','--verbose'}'[Show more output]'
'--ninja-args=[Arguments to pass to ninja (only when using ninja)]'
'--vs-args=[Arguments to pass to vs (only when using msbuild)]'
)
_arguments \
'(: -)'{'--help','-h'}'[show a help message and quit]' \
"${(@)specs}"
}
if [[ $service != meson ]]; then
_call_function ret _$service

Loading…
Cancel
Save