-
-
Notifications
You must be signed in to change notification settings - Fork 657
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bash completion: command not found #1595
Comments
I don't think that you are doing anything wrong. I think it is just that you completions may be out of date. If I look at the defintion of have() on my Ubuntu box, I see:
However, we could modify our bash completer to also source the |
Thanks for your reply~ Yes the completions installed by homebrew is a little bit outdated. But still, if I ran that command on my linux box (with bash-completion 2.3.5 installed), it prints:
It seems that, one way or another, individual completion scripts will depend on the "main" script I thought about fixing this issue by sourcing the A good way to fix this can be modifying Any ideas? @scopatz |
Yeah, how slow is it though really? Do you have any timings?
I think that this would be too fragile, personally. It also seems excessive for their to be a bash process open for every xonsh process in practice. If loading all the scripts really is too slow (and I can see how it would be), I think a better strategy would be:
This would make sure that those functions are available. Alternatively, we could
I'd be pretty happy with an implementation of any of the above strategies. |
How about that? I set |
Awesome! |
I'm using xonsh 0.4.5 on OS X, with bash-completion 1.3 installed with homebrew.
My
$BASH_COMPLETIONS
is set to['/usr/local/etc/bash_completion']
, but bash completion does not working. So I looked at the code atcompleters/bash.py
and tested the following code:The
have
command inbash_completion.d/ssh
is defined inbash_completion
which is not loaded. I also checked bash-completion 2.3.5 in archlinux, itscompletions/ssh
also uses some functions like_init_completion
inbash_completion
.I have
source /usr/local/etc/bash_completion
in my.bashrc
but it wont load while running bash bybash -c
.Did I do anything wrong or it may be a bug? Thanks!
The text was updated successfully, but these errors were encountered: