2 # Bash completion for oemake
4 # contact: oe at haslup dot com
7 # Uses $OEDIR to find your local.conf in which it
8 # expects OEFILES to be defined.
10 # If it's not, feel free to add an OEFILES like below:
11 #OEFILES="/data/zaurus/openembedded/packages/*/*.oe"
17 if [ -e $OEDIR/conf/local.conf ]; then
18 OEFILES=`grep -E "^OEFILES" $OEDIR/conf/local.conf|sed 's/^.*= *//'`
20 echo "Couldn't find conf/local.conf, maybe set OEDIR?"
23 export COMPLETE_OE_PKG_CACHE=$(for f in `ls ${OEFILES//\"/}` ; do basename $f | sed 's/\_.*$//' ; done)
31 cur=${COMP_WORDS[COMP_CWORD]}
33 COMPREPLY=( $(compgen -W '$COMPLETE_OE_PKG_CACHE' -- $cur ) )
41 cur=${COMP_WORDS[COMP_CWORD]}
45 COMPREPLY=( $(compgen -W '$COMPLETE_OE_PKG_CACHE' -- $cur ) )
46 #COMPREPLY=( $( (compgen -W '$(for f in `find $OE_PKG_DIR -not -path "*SCCS*" -name "*.oe" -exec basename {} \;` ; do echo $f | sed 's/\_.*$//' ;
52 # Choose one of the commands below... the cached version is pretty quick, but might need
53 # refreshing each time you update your packages directory. Non-cached is too slow
56 # If you can use the non-cached, more power to you and your speedy machine :)
58 complete -F _oemake_cached oemake
59 #complete -F _oemake oemake