-
-
Notifications
You must be signed in to change notification settings - Fork 660
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
Git-completer tab complete? #1786
Comments
Hi @dam5h - Yes git - and all bash completions - should work in xonsh. Please ensure that the |
I hadn't missed this, but I just noticed I have the same issue. Without having changed it:
However, it seems the git completions are actually at
resolves the issue, but I see no reason to leave the others if they don't exist for you either, @dam5h. Are these built-in xonsh defaults @scopatz, or bash defaults, or something else? I'm pretty sure I never set them. |
They're built-in xonsh defaults. Their location can vary, especially on OSX, depending on how bash completion was installed |
Sweet! Its working now. I am on arch linux and needed to install bash-completion and it ended up in the default location. My ZSH must have been using something other than bash-completion to do the same thing. Thanks! |
Great news, @dam5h ! I'm going to go ahead and close this, then, but reopen if any issues persist. |
Hm… not working for me on macOS even after adding |
@Glutexo - can you provide a little more information about your system? Where do the bash completions actually live? |
Thanks for response, @scopatz! My bash completions are really in /usr/local/etc/bash_completion.d. git-completion.bash is among them. $BASH_COMPLETIONS contains:
System is When I type |
You might need to find the git completion file (called |
It looks like I don’t have anything that would contain |
@Glutexo - what does your |
Here is the output:
|
Have you followed the instructions here: https://xon.sh/osx.html#tab-completion? |
I did. I have the bash-completion2 package installed. The file /usr/local/share/bash-completion/bash_completion exists, is readable and is listed in $BASH_COMPLETIONS. Yet the completions still don’t work. :( |
I'm having a similar issue |
I'm trying xonsh for the first time, and running into a similar problem. Pressing Tab while entering Git commands currently suggests filenames. I'm on macOS 10.12.6.
Hope that helps suggest a solution! I'd really like to have my Git completions back. :) Edit: I don't suppose it has anything to with this error that pops up everytime I start xonsh in a terminal? |
@DBerke -- are you using the version of And the contents of the |
@gforsyth - Thanks. I don't remember having to install I moved the
Investigating, I found that the file was actually a symlink pointing to
However, if I open up the Python REPL (v3.7.3) and run the same code it returns True. I wonder if it's a permissions problem, maybe? Perhaps xonsh doesn't have permission to see that directory somehow? |
Caveat: I'm using That said, I only need to have the The |
How does |
I think you mean Sometime around fall 2019, bash completions for Git stopped working in my environment, possibly due to the Catalina upgrade, or updates to XCode, updates to xonsh, or similar. The issue I'm experiencing is very similar to that reported by DBerke. I'd like to get git completions to work according to the recommended procedure. Here's my xonfig:
I've installed
The docs say:
And indeed that file now exists:
Yet still git completions are not working.
@gforsyth For me, "those completion directories" seems to refer to the entries specified in I can To debug, I put a breakpoint where the completion script is run. It seems the bash completion is running successfully, but returning a list of files and not git completions.
I suspect what's happened is that with the move from bash to zsh on Catalina, macOS no longer includes git completions for bash. |
Indeed, when I run |
I see there are a number of bash completions present:
|
In
And And I find when I set I think there's a bug in Homebrew where it's installing the completions to one directory but referencing them in another. |
@jaraco Is this still working for you today? Did you need to perform any custom configuration since the Homebrew fix? I can't get completions working in xonsh for git. Completion does work for other tools that have a completions file in /usr/local/etc/bash_completion.d/ (e.g. brew, tig), however. I should note that git completion doesn't work under bash (v5) either (completions for other tools do work), unless I source /usr/local/etc/bash_completion.d/git-completion.bash manually. |
No. Git completion recently became broken again for me, on xonsh and on bash, because I have |
Thanks @jaraco. I forgot I even had hub installed since I don't use it. Uninstalling it fixes git completion for me! Note that gh replaces hub as the official GitHub CLI tool. gh doesn't break git completion. Here's a well-hidden feature comparison. |
In trying xonsh for the first time for the past 24hrs I am missing the git completion that I had in zsh. I read up on the completers section in the docs and also googled around a bit but I don't see any reference to git competetion for xonsh. There is a bash script for this. Is it possible to leverage this from xonsh, or not so much?
Thanks!
The text was updated successfully, but these errors were encountered: