blob: 14f634d829262c8f55aa7e13e5063228782d7118 [file] [log] [blame]
Meng yu99dbc832023-12-22 15:52:06 +08001
2source fip/variables.sh
3
4in_bootloade=0
5
6__mk() {
7 local cur prev
8
9 COMPREPLY=()
10 cur=`_get_cword`
11 prev=${COMP_WORDS[COMP_CWORD-1]}
12
13 case "$prev" in
14 ./mk)
15 COMPREPLY=( $( compgen -W "$(ls ${BL33_DEFCFG1}/ ${BL33_DEFCFG2}/ \
16 ${BL33_DEFCFG3}/ 2>/dev/null |sed -n '/_defconfig/p;'|sed 's/_defconfig//g') " -- $cur) )
17
18 if [[ -z $COMPREPLY ]]; then
19 #echo "not generating COMPREPLY or not in bootloader"
20 in_bootloader=0
21 else
22 #echo "Generating COMPREPLY in bootloader"
23 in_bootloader=1
24 fi
25 ;;
26 *)
27 if [[ $in_bootloader == 1 ]]; then
28 COMPREPLY=( $( compgen -W "$(echo ${COMPILE_PARA_LIST[@]})" -- $cur) )
29 fi
30
31 ;;
32 esac
33}
34
35complete -F __mk mk
36complete -r ./mk 2>/dev/null