sg3-utils: add newer buildable version
[openembedded.git] / contrib / bb_bash_completions
1 # simple bash autocompletions file for the OE recipes. It can be
2 # inserted into the default profile.sh, or sourced in the same file.
3
4
5 _bitbake() 
6 {
7     if [[ $OE_HOME ]]; then
8         local cur prev general exact words
9         COMPREPLY=()
10         cur="${COMP_WORDS[COMP_CWORD]}"
11         prev="${COMP_WORDS[COMP_CWORD-1]}"
12         general=$(ls $OE_HOME/openembedded/recipes)
13         exact=$(find $OE_HOME/openembedded/recipes -name $cur*.bb | xargs -I"@@" basename @@ '.bb')
14         words="$general $exact"
15
16         COMPREPLY=( $(compgen -W "$words" -- ${cur}) )
17         return 0
18     fi
19     return -1
20 }
21 complete -F _bitbake bitbake
22