Lines Matching +full:ce +full:- +full:break +full:- +full:config

1 # Bash auto-completion for west subcommands and flags. To initialize, run
3 # source west-completion.bash
7 __west_previous_extglob_setting=$(shopt -p extglob)
8 shopt -s extglob
12 # bash_completion - programmable completion functions for bash 3.2+
14 # Copyright © 2006-2008, Ian Macdonald <ian@caliban.org>
15 # © 2009-2010, Bash Completion Maintainers
16 # <bash-completion-devel@lists.alioth.debian.org>
33 # http://bash-completion.alioth.debian.org/
41 # if test "${words_[cword_-1]}" = -w
52 # make option types like --date=<type> and <rev>:<path> easy to
68 if [ -z "$exclude" ]; then
73 # re-assemble words to complete.
79 [ $i -gt 0 ] &&
80 [ -n "${COMP_WORDS[$i]}" ] &&
86 if [ $j -ge 2 ] && [ -n "$first" ]; then
87 ((j--))
94 if (($i < ${#COMP_WORDS[@]} - 1)); then
112 if [ "$1" = "-n" ]; then
118 while [ $# -gt 0 ]; do
124 prev=${words_[$cword_-1]}
148 COMPREPLY=( $( compgen -P '~' -u -- "${1#\~}" ) )
151 [[ $result -gt 0 ]] && compopt -o filenames 2>/dev/null
164 # $ compgen -f "a'b/" # Wrong, doesn't return output
165 # $ compgen -f "a\'b/" # Good
169 # - http://lists.gnu.org/archive/html/bug-bash/2009-03/msg00155.html
170 # - http://www.mail-archive.com/bash-completion-devel@lists.alioth.\
176 if [ -z "$1" ]; then
178 printf -v $2 %s "$1"
181 printf -v $2 %s "${1:1}"
184 printf -v $2 \~%q "${1:1}"
186 printf -v $2 %q "$1"
192 [[ ${!2} == *\\* ]] && printf -v $2 %s "${1//\\\\/\\}"
194 # If result becomes quoted like this: $'string', re-evaluate in order to
195 # drop the additional quoting. See also: http://www.mail-archive.com/
196 # bash-completion-devel@lists.alioth.debian.org/msg01942.html
201 # This function turns on "-o filenames" behavior dynamically. It is present
209 type compopt &>/dev/null && compopt -o filenames 2>/dev/null || \
210 compgen -f /non-existing-dir/ >/dev/null
215 # simply using 'compgen -f', because it honours spaces in filenames.
216 # @param $1 If `-d', complete only on directories. Otherwise filter/pick only
226 local -a toks
229 x=$( compgen -d -- "$cur" ) &&
230 while read -r tmp; do
234 if [[ "$1" != -d ]]; then
241 x=$( compgen -f -X "$xspec" -- $quoted ) &&
242 while read -r tmp; do
247 [[ -n ${COMP_FILEDIR_FALLBACK:-} && -n "$1" && ${#toks[@]} -lt 1 ]] && \
248 x=$( compgen -f -- $quoted ) &&
249 while read -r tmp; do
254 if [[ ${#toks[@]} -ne 0 ]]; then
263 # https://github.com/docker/docker-ce/blob/master/components/cli/contrib/completion/bash/docker
267 # you should pass a glob describing those options, e.g. "--option1|-o|--option2"
273 local counter=$((${subcommand_pos:-${command_pos}} + 1))
274 while [ "$counter" -le "$cword" ]; do
275 …if [ -n "$argument_flags" ] && eval "case '${words[$counter]}' in $argument_flags) true ;; *) fals…
277 # eat "=" in case of --option=arg syntax
281 -*)
284 break
290 # "--debug=false" => 3 words, "--log-opt syslog-facility=daemon" => 4 words
303 # This function is needed for key-specific completions.
311 glob_pos=$((cword - 2))
314 glob_pos=$((cword - 1))
316 key=${words[$cword - 2]} # key=value case
317 glob_pos=$((cword - 3))
322 [ "${words[$glob_pos]}" = "=" ] && ((glob_pos--)) # --option=key=value syntax
328 # Valid values for `option_glob` are option names like `--log-level` and globs like
329 # `--log-level|-l`
336 while [ "$counter" -lt "$cword" ]; do
340 break
367 _filedir -d
379 COMPREPLY=($(compgen -W "${*:1}" -- "$cur"))
390 __set_comp "$(__west_x list --format={name} "$@")"
395 boards=( $(__west_x boards --format='{name}|{qualifiers}' "$@") )
412 --zephyr-base|-z)
423 -*)
428 if [ "$cword" -eq "$counter" ]; then
438 --manifest -m
439 --local -l
443 --manifest-rev --mr
444 --manifest-file --mf
457 -*)
466 --stats
467 --narrow -n
468 --keep-descendants -k
469 --rebase -r
473 --name-cache
474 --path-cache
478 --fetch -f
479 --fetch-opt -o
497 -*)
509 --format -f
513 --all -a
526 -*)
538 --resolve
539 --freeze
540 --validate
541 --path
544 --out -o
557 -*)
566 --all -a
570 -*)
582 --all -a
585 -*)
597 --all -a
600 -c
612 -*)
624 --list -l
625 --delete -d
626 --delete-all -D
627 --global
628 --local
629 --system
633 -*)
644 if [ "$cword" -eq "$counter" ]; then
657 if [ "$cword" -eq "$counter" ]; then
667 --format -f
668 --name -n
672 --arch-root
673 --board-root
674 --soc-root
691 -*)
700 --format -f
701 --name -n
705 --board-root
722 -*)
731 --cmake -c
732 --cmake-only
733 -n --just-print --dry-run --recon
734 --force -f
735 --sysbuild
736 --no-sysbuild
740 --board -b
741 --snippet -S
742 --shield
743 --pristine -p
747 --build-dir -d
751 --target -t
752 --test-item -T
753 --build-opt -o
759 --board|-b)
763 --shield)
767 --pristine|-p)
782 -*)
794 --quiet -q
795 --force -f
796 --bin --no-bin
797 --hex --no-hex
801 --tool -t
805 --build-dir -d
806 --tool-path -p
807 --tool-data -D
811 --sbin -B
812 --shex -H
822 --tool|-t)
833 -*)
843 --context -H
844 --skip-rebuild
848 --board-dir
849 --openocd-search
850 --build-dir -d
854 --file -f
855 --file-type -t
856 --elf-file
857 --hex-file
858 --bin-file
859 --gdb
860 --openocd
864 --runner -r
865 --domain
866 --dev-id -i
883 -*)
912 --init -i
913 --analyze-includes
914 --include-sdk
918 --build-dir -d
919 --namespace-prefix -n
920 --spdx-dir -s
924 --namespace-prefix -n
942 -*)
951 --format -f
966 -*)
978 --aggressive-no-clean
979 --all -l
980 --all-deltas -D
981 --allow-installed-plugin
982 --build-only -b
983 --clobber-output -c
984 --cmake-only
985 --coverage -C
986 --create-rom-ram-report
987 --detailed-skipped-report
988 --detailed-test-id
989 --device-flash-with-test
990 --device-testing
991 --disable-suite-name-check
992 --disable-unrecognized-section-test
993 --disable-warnings-as-errors -W
994 --dry-run -y
995 --emulation-only
996 --enable-asan
997 --enable-coverage
998 --enable-lsan
999 --enable-size-report
1000 --enable-slow -S
1001 --enable-slow-only
1002 --enable-ubsan
1003 --enable-valgrind
1004 --flash-before
1005 --footprint-from-buildlog
1006 --force-color
1007 --force-platform -K
1008 --force-toolchain
1009 --ignore-platform-key
1010 --inline-logs -i
1011 --integration -G
1012 --last-metrics -m
1013 --list-tags
1014 --list-tests
1015 --make -k
1016 --ninja -N
1017 --no-clean -n
1018 --no-detailed-test-id
1019 --no-update -u
1020 --only-failed -f
1021 --overflow-as-errors
1022 --persistent-hardware-map
1023 --platform-reports
1024 --prep-artifacts-for-testing
1025 --quarantine-verify
1026 --retry-build-errors
1027 --short-build-path
1028 --show-footprint
1029 --shuffle-tests
1030 --test-only
1031 --test-tree
1032 --timestamps
1033 --verbose -v
1037 --alt-config-root
1038 --board-root -A
1039 --coverage-basedir
1040 --outdir -O
1041 --report-dir -o
1042 --testsuite-root -T
1046 --compare-report
1047 --device-serial
1048 --device-serial-pty
1049 --gcov-tool
1050 --generate-hardware-map
1051 --hardware-map
1052 --load-tests -F
1053 --log-file
1054 --package-artifacts
1055 --pre-script
1056 --quarantine-list
1057 --save-tests -E
1058 --size -z
1059 --test-config
1063 --coverage-platform
1064 --coverage-tool
1065 --exclude-platform -P
1066 --filter
1067 --log-level
1068 --platform -p
1069 --runtime-artifact-cleanup -M
1073 --arch -a
1074 --coverage-formats
1075 --device-flash-timeout
1076 --device-serial-baud
1077 --exclude-tag -e
1078 --extra-args -x
1079 --fixture -X
1080 --footprint-threshold -H
1081 --jobs -j
1082 --level
1083 --pytest-args
1084 --report-name
1085 --report-suffix
1086 --retry-failed
1087 --retry-interval
1088 --scenario --test -s
1089 --seed
1090 --shuffle-tests-seed
1091 --sub-test
1092 --subset -B
1093 --tag -t
1094 --timeout-multiplier
1095 --vendor
1096 --west-flash
1097 --west-runner
1103 --platform|-p|--exclude-platform|-P|--coverage-platform)
1108 --coverage-tool)
1113 --filter)
1118 --log-level)
1123 --runtime-artifact-cleanup|-M)
1145 -*)
1154 --interactive -i
1155 --no-toolchains -T
1156 --no-hosttools -H
1160 --install-dir -d
1161 --install-base -b
1165 --version
1166 --toolchains -t
1167 --personal-access-token
1168 --api-url
1192 -*)
1200 local previous_extglob_setting=$(shopt -p extglob)
1201 shopt -s extglob
1213 config
1228 zephyr-export
1239 --help -h
1240 --verbose -v
1241 --version -V
1244 --zephyr-base -z
1249 _get_comp_words_by_ref -n : cur words cword prev
1253 while [ "$counter" -lt "$cword" ]; do
1261 -*)
1269 break
1277 local completions_func=__comp_west_${command//-/_}
1279 declare -F $completions_func >/dev/null && $completions_func
1289 complete -F __comp_west west