py-bash-completion
py-bash-completion copied to clipboard
A framework for accessing bash completions from Python
As per discussion in xonsh/xonsh#2814, a systemwide bashrc might be used as a completion script fallback. The downside seems to be slower execution. On the upside, I'd argue that it...
bash-completion has a guard condition so it won't be sourced without PS1 being set https://github.com/scop/bash-completion/blob/6009de8534cd24b71d0bfda479823abcc640e4b1/bash_completion.sh.in#L2 Indeed, on my system it doesn't get sourced, while adding `PS1=something` before `{source}` fixes that.
@scopatz @gforsyth What do you guys think about having this as a package not as module, and using amalgamation on it before adding this to xonsh. We can even store...
This PR is the result of merging current versions of [xonsh/xonsh/completers/bash_completion.py](https://github.com/xonsh/xonsh/blob/bb75a5a53ba6b5e4ed60ae88839283075e9f47dc/xonsh/completers/bash_completion.py#L1) and [py-bash-completion/bash_completion.py](https://github.com/xonsh/py-bash-completion/blob/da155cc11d0142b16474d38efad173d0ee0cdd66/bash_completion.py#L1).