1# /usr/share/bash-completion/completions/debi 2# Bash command completion for ‘debi(1)’. 3# Documentation: ‘bash(1)’, section “Programmable Completion”. 4 5_debc() 6{ 7 local cur 8 cur="${COMP_WORDS[COMP_CWORD]}" 9 COMPREPLY=($(compgen -f -X '!*.changes' -- "$cur")) 10 if echo "$cur" | grep -qs '^[a-z0-9+.-]*$'; then 11 COMPREPLY=(${COMPREPLY[@]} $(apt-cache pkgnames -- $cur 2> /dev/null)) 12 fi 13 return 0 14} 15complete -o dirnames -F _debc debc debi 16 17 18# Local variables: 19# coding: utf-8 20# mode: shell-script 21# indent-tabs-mode: nil 22# End: 23# vim: fileencoding=utf-8 filetype=sh expandtab shiftwidth=4 : 24