mirror of https://github.com/ArduPilot/ardupilot
Updated changes as requested in waf for shell completion
This commit is contained in:
parent
ea3d8046da
commit
070b7c3202
|
@ -53,8 +53,7 @@ _waf()
|
|||
|
||||
case $prev in
|
||||
--board)
|
||||
# get options between board and debug, remove everything before "are", remove everything after "--debug", remove final dot, remove all comma
|
||||
opts=$(./waf --help | sed -n '/--board=/,/--debug/p' | sed -e 's/.*are //g' -e 's/\(--debug.*\)//g' -e 's/[.]//g' -e 's/[,]//g')
|
||||
opts=$(./waf list_boards | sed -e '$d')
|
||||
COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
|
||||
return 0
|
||||
;;
|
||||
|
|
|
@ -39,8 +39,7 @@ _waf() {
|
|||
|
||||
(( $+functions[_waf_boards] )) ||
|
||||
_waf_boards() {
|
||||
# get option between board and debug, remove everything before "are", remove everything after "--debug", remove final dot, remove all comma
|
||||
local boards; boards=( $(./waf --help | sed -n '/--board=/,/--debug/p' | sed -e 's/.*are //g' -e 's/\(--debug.*\)//g' -e 's/[.]//g' -e 's/[,]//g') )
|
||||
local boards; boards=( $(./waf list_boards | sed -e '$d'))
|
||||
_describe -t boards 'board' boards "$@" && ret=0
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue