py-bash-completion icon indicating copy to clipboard operation
py-bash-completion copied to clipboard

How does bash-completion even get sourced without PS1?

Open t184256 opened this issue 7 years ago • 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.

t184256 avatar Sep 14 '18 21:09 t184256

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

scopatz avatar Sep 14 '18 21:09 scopatz

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

t184256 avatar Sep 14 '18 21:09 t184256

Yeah it probably should :)

scopatz avatar Sep 14 '18 21:09 scopatz