Browse Source

scripts: west: commands: completion: bash: support shield argument

Add Bash completion support for "west build" shield argument.

Signed-off-by: Henrik Brix Andersen <hebad@vestas.com>
pull/73020/head
Henrik Brix Andersen 1 year ago committed by Anas Nashif
parent
commit
be14f9802a
  1. 10
      scripts/west_commands/completion/west-completion.bash

10
scripts/west_commands/completion/west-completion.bash

@ -401,6 +401,11 @@ __set_comp_west_boards() @@ -401,6 +401,11 @@ __set_comp_west_boards()
__set_comp ${boards[@]}
}
__set_comp_west_shields()
{
__set_comp "$(__west_x shields "$@")"
}
__comp_west_west()
{
case "$prev" in
@ -734,6 +739,7 @@ __comp_west_build() @@ -734,6 +739,7 @@ __comp_west_build()
local special_opts="
--board -b
--snippet -S
--shield
--pristine -p
"
@ -754,6 +760,10 @@ __comp_west_build() @@ -754,6 +760,10 @@ __comp_west_build()
__set_comp_west_boards
return
;;
--shield)
__set_comp_west_shields
return
;;
--pristine|-p)
__set_comp "auto always never"
return

Loading…
Cancel
Save