aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorSUBHASHINI V <subhashini.venugopalan@gmail.com>2009-10-04 01:11:00 -0700
committerKhem Raj <raj.khem@gmail.com>2009-10-04 01:12:41 -0700
commitbcd5894dcd9db9234dd6d99a9e1bd0d6d8fef19a (patch)
tree2d4f1f284c095922f5da785c262de5378be18900 /contrib
parent4e7aae593601b4dd5a665e651bcf0a8a371b9267 (diff)
downloadopenembedded-bcd5894dcd9db9234dd6d99a9e1bd0d6d8fef19a.tar.gz
bb_bash_completions: New utility for bitbake recipe autocompletions
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'contrib')
-rw-r--r--contrib/bb_bash_completions22
1 files changed, 22 insertions, 0 deletions
diff --git a/contrib/bb_bash_completions b/contrib/bb_bash_completions
new file mode 100644
index 0000000000..bee2d96976
--- /dev/null
+++ b/contrib/bb_bash_completions
@@ -0,0 +1,22 @@
+# simple bash autocompletions file for the OE recipes. It can be
+# inserted into the default profile.sh, or sourced in the same file.
+
+
+_bitbake()
+{
+ if [[ $OE_HOME ]]; then
+ local cur prev general exact words
+ COMPREPLY=()
+ cur="${COMP_WORDS[COMP_CWORD]}"
+ prev="${COMP_WORDS[COMP_CWORD-1]}"
+ general=$(ls $OE_HOME/openembedded/recipes)
+ exact=$(find $OE_HOME/openembedded/recipes -name $cur*.bb | xargs -I"@@" basename @@ '.bb')
+ words="$general $exact"
+
+ COMPREPLY=( $(compgen -W "$words" -- ${cur}) )
+ return 0
+ fi
+ return -1
+}
+complete -F _bitbake bitbake
+