xonsh/py-bash-completion

How does bash-completion even get sourced without PS1?

t184256 opened this issue · 3 comments

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.

You generally have PS1 in your env, even if it usused by xonsh

Great, but setting xonsh aside, should this library set it just in case?

Yeah it probably should :)