Skip to content

Instantly share code, notes, and snippets.

@devilholk
Last active November 17, 2020 01:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save devilholk/d1dcbb194086c84915c718d9ccafd95a to your computer and use it in GitHub Desktop.
Save devilholk/d1dcbb194086c84915c718d9ccafd95a to your computer and use it in GitHub Desktop.
Wrapper for using python for bash completion
#bashcomp.py: https://gist.github.com/devilholk/b176b9c62c83636eb7552b3629e0b067
_bashcomp() {
COMPREPLY=( $(eval `python /path/to/bashcomp.py $COMP_LINE`;) );
return 0;
}
complete -F _bashcomp my_command
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment