Skip to content

Commit e2249e8

Browse files
author
Damien François
committed
Add more complete bash completion
1 parent 20caa7b commit e2249e8

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

eb_bash_completion.bash

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
_eb()
2+
{
3+
local cur prev quoted
4+
_get_comp_words_by_ref cur prev
5+
_quote_readline_by_ref "$cur" quoted
6+
7+
case $cur in
8+
--*) _optcomplete "$@"; return 0 ;;
9+
*) COMPREPLY=( $(compgen -f -X '!*.eb' -- $cur ) \
10+
$(compgen -W "$($1 --search-file ${cur:-eb} --terse)" -- $cur) ) ;;
11+
esac
12+
}
13+
complete -F _eb eb

0 commit comments

Comments
 (0)