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
Autocomplete for aliases that shadow a different name #6002
Comments
Aliases should set the |
Oh, sorry, I just realized that the issue is a different: For two aliases, I had already existing programs in my PATH. So if there already exists a program with that name that the alias overwrites, then it tries to do the autocomplete for the original program and not for the alias. |
I can't recommend doing that. Names are quite important in a shell, and overriding them for the sake of saving a few characters (instead of e.g. Anyway, what happens here is that the alias sets up "wrapping" completions in the function (like Typically, this is what you want. E.g. if you set up Fixing this would require some sort of flag to disable the original completions (e.g. Again, I recommend picking a better name. |
I'm not so sure about that - I alias (well, abbreviate actually, but the point still stands) |
I agree with zanchey, I think you never want the completions of another program than you're executing |
I'm using fish version 3.0.2 and my aliases are not created with
I get proper autocomplete if I define the function manually to add |
@danberindei Note that fish 3.0.2 didn't show "--wraps" definitions for functions, but it should be defined since 973533e. If it isn't, the most likely issue is that you've overridden the "alias" function. Check |
@faho thanks, I see now that I did not get autocompletions because of #1625 (comment) |
Perhaps an abbreviation would be better for this scenario using abbr. |
I agree with this as well. I have various aliases set for things like
and I would assume these are quite common. And I feel like abbreviations are not a good solution for these type of commands either.
This does sound like a good solution to me tho! |
It would be really nice to have autocomplete also when using aliases, e.g. when typing
git status<tab>
I get autocomplete, but when I have an alias gs for git status, I don't. Or is there already a way to achieve this?I'm currently running fish 3.0.2.
The text was updated successfully, but these errors were encountered: