Lines Matching +full:- +full:- +full:quiet

4 # SPDX-License-Identifier: Apache-2.0
6 # Ensure this works also when being source-ed
9 typeset -A -g _opt_args
12 local -a builtin_cmds=(
25 local -a zephyr_ext_cmds=(
29 'sign[sign a Zephyr binary for bootloader chain-loading]'
34 'zephyr-export[export Zephyr installation as a CMake config package]'
40 local -a all_cmds=(${builtin_cmds} ${zephyr_ext_cmds})
42 if [[ -v WEST_COMP_CHECK_WORKSPACE ]]; then
44 if [ $? -eq 0 ]; then
54 # Completion script for Zephyr's meta-tool, west
59 local -a global_opts=(
60 # (: * -) as exclusion list means exclude everything else
61 '(: * -)'{-h,--help}'[show help]'
63 {-v,--verbose}'[enable verbosity]'
64 '(: * -)'{-V,--version}'[print version]'
65 '(-z --zephyr-base)'{-z,--zephyr-base}'[zephyr base folder]:zephyr base folder:_directories'
68 typeset -A opt_args
70 local -a orig_words
74 _arguments -S -C \
76 "1: :->cmds" \
77 "*::arg:->args" \
98 [[ -v _opt_args[-z] ]] && extra_args="-z $_opt_args[-z]"
99 [[ -v _opt_args[--zephyr-base] ]] && extra_args="-z $_opt_args[--zephyr-base]"
101 _west_projs=($(__west_x $extra_args list --format={name}))
106 _west_boards=( $(__west_x boards --format='{name}|{qualifiers}') )
118 local -a opts=(
119 '(-l --local)'{--mr,--manifest-rev}'[manifest revision]:manifest rev:'
120 {--mf,--manifest-file}'[manifest file]:manifest file:'
121 '(-l --local)'{-m,--manifest}'[manifest URL]:manifest URL:_directories'
122 …'(-m --manifest --mr --manifest-rev)'{-l,--local}'[use local directory as manifest repository]:loc…
125 _arguments -S $opts \
130 local -a opts=(
131 '--stats[print performance stats]'
132 '--name-cache[name-based cache]:name cache folder:_directories'
133 '--path-cache[path-based cache]:path cache folder:_directories'
134 {-f,--fetch}'[fetch strategy]:fetch strategy:(always smart)'
135 {-o,--fetch-opt}'[fetch options]:fetch options:'
136 {-n,--narrow}'[narrow fetch]'
137 {-k,--keep-descendants}'[keep manifest-rev descendants checked out]'
138 {-r,--rebase}'[rebase checked out branch onto the new manifest-rev]'
141 _arguments -S $opts \
146 local -a opts=(
147 {-a,--all}'[include inactive projects]'
148 '--manifest-path-from-yaml[print performance stats]'
149 {-f,--format}'[format string]:format string:'
152 _arguments -S $opts \
157 local -a opts=(
158 '--resolve[resolve into single manifest]'
159 '--freeze[resolve into single manifest, with SHAs]'
160 '--validate[silently validate manifest]'
161 '--path[print the path to the top level manifest file]'
162 {-o,--out}'[output file]:output file:_files'
165 _arguments -S $opts
169 local -a opts=(
170 {-a,--all}'[include inactive projects]'
173 _arguments -S $opts \
178 local -a opts=(
179 {-a,--all}'[include inactive projects]'
182 _arguments -S $opts \
187 local -a opts=(
188 '-c[command to execute]:command:'
189 {-a,--all}'[include inactive projects]'
192 _arguments -S $opts \
197 local -a opts=(
198 {-l,--list}'[list all options and values]'
199 {-d,--delete}'[delete an option in one config file]'
200 {-D,--delete-all}"[delete an option everywhere it\'s set]"
202 '--system[system-wide file]'
203 '--global[global user-wide file]'
204 "--local[this workspace\'s file]"
207 _arguments -S $opts
216 _arguments -S "1:shell:(bash zsh fish)"
220 local -a opts=(
221 {-f,--format}'[format string]:format string:'
222 {-n,--name}'[name regex]:regex:'
223 '*--arch-root[Add an arch root]:arch root:_directories'
224 '*--board-root[Add a board root]:board root:_directories'
225 '*--soc-root[Add a soc root]:soc root:_directories'
228 _arguments -S $opts
232 local -a opts=(
233 '(-b --board)'{-b,--board}'[board to build for]:board:_get_west_boards'
234 '(-d --build-dir)'{-d,--build-dir}'[build directory to create or use]:build dir:_directories'
235 '(-f --force)'{-f,--force}'[ignore errors and continue]'
236 '--sysbuild[create multi-domain build system]'
237 '--no-sysbuild[do not create multi-domain build system]'
238 '(-c --cmake)'{-c,--cmake}'[force a cmake run]'
239 '--cmake-only[just run cmake]'
240 '--domain[execute build tool (make or ninja) for a given domain]:domain:'
241 '(-t --target)'{-t,--target}'[run build system target]:target:'
242 '(-T --test-item)'{-T,--test-item}'[Build based on test data in .yml]:test item:'
243 {-o,--build-opt}'[options to pass to build tool (make or ninja)]:tool opt:'
244 …'(-n --just-print --dry-run --recon)'{-n,--just-print,--dry-run,--recon}"[just print build command…
245 '(-p --pristine)'{-p,--pristine}'[pristine build setting]:pristine:(auto always never)'
247 _arguments -S $opts \
252 local -a opts=(
253 '(-d --build-dir)'{-d,--build-dir}'[build directory to create or use]:build dir:_directories'
254 '(-q --quiet)'{-q,--quiet}'[suppress non-error output]'
255 '(-f --force)'{-f,--force}'[ignore errors and continue]'
256 '(-t --tool)'{-t,--tool}'[image signing tool name]:tool:(imgtool rimage)'
257 '(-p --tool-path)'{-p,--tool-path}'[path to the tool]:tool path:_directories'
258 '(-D --tool-data)'{-D,--tool-data}'[path to tool data]:tool data path:_directories'
259 '(--no-bin)--bin[produce a signed bin file]'
260 '(--bin)--no-bin[do not produce a signed bin file]'
261 '(-B --sbin)'{-B,--sbin}'[signed .bin filename]:bin filename:_files'
262 '(--no-hex)--hex[produce a signed hex file]'
263 '(--hex)--no-hex[do not produce a signed hex file]'
264 '(-H --shex)'{-H,--shex}'[signed .hex filename]:hex filename:_files'
267 _arguments -S $opts
270 typeset -a -g _west_runner_opts=(
271 '(-H --context)'{-H,--context}'[print runner-specific options]'
272 '--board-dir[board directory]:board dir:_directories'
273 '(-f --file)'{-f,--file}'[path to binary]:path to binary:_files'
274 '(-t --file-type)'{-t,--file-type}'[type of binary]:type of binary:(hex bin elf)'
275 '--elf-file[path to zephyr.elf]:path to zephyr.elf:_files'
276 '--hex-file[path to zephyr.hex]:path to zephyr.hex:_files'
277 '--bin-file[path to zephyr.bin]:path to zephyr.bin:_files'
278 '--gdb[path to GDB]:path to GDB:_files'
279 '--openocd[path to openocd]:path to openocd:_files'
280 '--openocd-search[path to add to openocd search path]:openocd search:_directories'
284 local -a opts=(
285 '(-d --build-dir)'{-d,--build-dir}'[build directory to create or use]:build dir:_directories'
286 '(-r --runner)'{-r,--runner}'[override default runner from build-dir]:runner:'
287 '--skip-rebuild[do not refresh cmake dependencies first]'
288 '--domain[execute build tool (make or ninja) for a given domain]:domain:'
291 local -a all_opts=(${_west_runner_opts} ${opts})
292 _arguments -S $all_opts
308 local -a opts=(
309 '(-i --init)'{-i,--init}'[initialize CMake file-based API]'
310 '(-d --build-dir)'{-d,--build-dir}'[build directory to create or use]:build dir:_directories'
311 '(-n --namespace-prefix)'{-n,--namespace-prefix}'[namespace prefix]:namespace prefix:'
312 '(-s --spdx-dir)'{-s,--spdx-dir}'[SPDX output directory]:spdx output dir:_directories'
313 '--analyze-includes[also analyze included header files]'
314 '--include-sdk[also generate SPDX document for SDK]'
316 _arguments -S $opts
320 local -a blob_cmds=(
328 _arguments -S -C \
329 "1: :->cmds" \
330 "*::arg:->args" \
345 local -a opts=(
346 {-f,--format}'[format string]:format string:'
349 _arguments -S $opts \
354 _arguments -S "1:west proj:_get_west_projs"
358 _arguments -S "1:west proj:_get_west_projs"
361 # don't run the completion function when being source-ed or eval-ed