Skip to content

Commit

Permalink
Merge pull request #1580 from damienfrancois/bash_completion
Browse files Browse the repository at this point in the history
More complete bash completion
  • Loading branch information
boegel committed Feb 5, 2016
2 parents 440d079 + 4e71a0b commit 6aad970
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
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
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ def find_rel_test():
packages=easybuild_packages,
package_dir={'test.framework': "test/framework"},
package_data={"test.framework": find_rel_test()},
scripts=["eb", "optcomplete.bash", "minimal_bash_completion.bash"],
scripts=["eb", "optcomplete.bash", "minimal_bash_completion.bash", "eb_bash_completion.bash"],
data_files=[('easybuild/scripts', glob.glob('easybuild/scripts/*'))],
long_description=read('README.rst'),
classifiers=[
Expand Down

0 comments on commit 6aad970

Please sign in to comment.