Skip to content

Commit 8644b33

Browse files
committed
west: Update bash autocomplete file
Update the existing bash autocomplete with the latest commands and command-line switches. Signed-off-by: Carles Cufi <[email protected]>
1 parent e6d7118 commit 8644b33

File tree

1 file changed

+74
-2
lines changed

1 file changed

+74
-2
lines changed

scripts/west_commands/completion/west-completion.bash

Lines changed: 74 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -590,8 +590,10 @@ __comp_west_completion()
590590
__comp_west_boards()
591591
{
592592
local boards_args_opts="
593-
--format -f --name -n
594-
--arch-root --board-root
593+
--format -f
594+
--name -n
595+
--arch-root
596+
--board-root
595597
"
596598

597599
case "$prev" in
@@ -629,6 +631,7 @@ __comp_west_build()
629631
--board -b
630632
--build-dir -d
631633
--target -t
634+
--test-item -T
632635
--pristine -p
633636
--build-opt -o
634637
"
@@ -665,6 +668,7 @@ __comp_west_build()
665668
__comp_west_sign()
666669
{
667670
local sign_bool_opts="
671+
--quiet -q
668672
--force -f
669673
--bin --no-bin
670674
--hex --no-hex
@@ -674,6 +678,7 @@ __comp_west_sign()
674678
--build-dir -d
675679
--tool -t
676680
--tool-path -p
681+
--tool-data -D
677682
-B --sbin
678683
-H --shex
679684
"
@@ -706,9 +711,14 @@ __comp_west_runner_cmd()
706711
local runner_bool_opts="
707712
--context -H
708713
--skip-rebuild
714+
--erase
715+
--no-erase
709716
"
710717
local runner_args_opts="
711718
--build-dir -d
719+
--domain
720+
--dev-id -i
721+
--dt-flash
712722
--cmake-cache -c
713723
--runner -r
714724
--board-dir
@@ -758,6 +768,65 @@ __comp_west_attach()
758768
__comp_west_runner_cmd
759769
}
760770

771+
__comp_west_spdx()
772+
{
773+
local spdx_bool_opts="
774+
--init -i
775+
--analyze-includes
776+
--include-sdk
777+
"
778+
779+
local spdx_args_opts="
780+
--build-dir -d
781+
--namespace-prefix -n
782+
--spdx-dir -s
783+
"
784+
785+
case "$prev" in
786+
--spdx-dir|-s|--build-dir|-d)
787+
__set_comp_dirs
788+
return
789+
;;
790+
esac
791+
792+
case "$cur" in
793+
-*)
794+
__set_comp $spdx_bool_opts $spdx_args_opts
795+
;;
796+
*)
797+
__set_comp_dirs
798+
;;
799+
esac
800+
}
801+
802+
__comp_west_blobs()
803+
{
804+
local blobs_args_opts="
805+
--format -f
806+
"
807+
808+
case "$prev" in
809+
list|fetch|clean)
810+
__set_comp_west_projs
811+
return
812+
;;
813+
*)
814+
__set_comp "list fetch clean"
815+
return
816+
;;
817+
esac
818+
819+
case "$cur" in
820+
-*)
821+
__set_comp $blobs_args_opts
822+
;;
823+
*)
824+
__set_comp_dirs
825+
;;
826+
esac
827+
}
828+
829+
761830
__comp_west()
762831
{
763832
local previous_extglob_setting=$(shopt -p extglob)
@@ -774,6 +843,7 @@ __comp_west()
774843
status
775844
forall
776845
config
846+
topdir
777847
help
778848
)
779849

@@ -787,6 +857,8 @@ __comp_west()
787857
debugserver
788858
attach
789859
zephyr-export
860+
spdx
861+
blobs
790862
)
791863

792864
local cmds=(${builtin_cmds[*]} ${zephyr_ext_cmds[*]})

0 commit comments

Comments
 (0)