Skip to content

Commit

Permalink
Add more complete bash completion
Browse files Browse the repository at this point in the history
  • Loading branch information
Damien François committed Jan 28, 2016
1 parent 20caa7b commit e2249e8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions eb_bash_completion.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
_eb()
{
local cur prev quoted
_get_comp_words_by_ref cur prev
_quote_readline_by_ref "$cur" quoted

case $cur in
--*) _optcomplete "$@"; return 0 ;;
*) COMPREPLY=( $(compgen -f -X '!*.eb' -- $cur ) \
$(compgen -W "$($1 --search-file ${cur:-eb} --terse)" -- $cur) ) ;;
esac
}
complete -F _eb eb

0 comments on commit e2249e8

Please sign in to comment.