-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Tab completion doesn't work for abbreviations #3233
Comments
Odd that I've never noticed that, but you're right. Abbreviations really should be part of the command completions. Patches welcomed. 😺 |
Would the completion expand it into the expected final, right-hand-side of an abbr definition when you've typed part of the (left hand) "before" side of the abbreviation? What would you see in the pager? How would that interact with completions that might already exist for one side or another we include, when the abbr transforms something that's a valid command into a different valid command? Just adding |
My expectation is that it would suggest the "before" part and it wouldn't expand until space or enter as usual. |
Except on enter, what it actually does is expand and execute for a normal abbreviation. That's probably too much to have occur when the interactive experience might have prepared you for a different result where your command doesn't get swapped out like that. |
I experienced this today, too. So "bac<tab>" should have completed to "backup-" Only after pressing Enter (or Space) the abbreviation should transfer into the expanded result on the command line (as it currently already does). So the same thing that @willwhitney said. I understand @floam's concerns, but as this is not different from what would happen if I had entered "backup-mt-eject<Enter>" myself, this is only as confusing as the current situation if you have abbreviations you don't know. Edit: Protected < and > with backslashes so they are shown |
@ThomasAH Do I correctly that your request is simply that tab-completions should expand abbreviations? |
@ridiculousfish No, tab-completion should complete abbreviations. Only Enter or Space should expand them. |
This enhancement would be very welcome. I have never written a line of C++ in my life but I'd be happy to help test patches/PR's. |
I stumbled upon this issue too when I made an abbreviation that is kind of lenghty (instead of a function/alias). Need it!! |
Fixed in 202bf0b |
awesome @ridiculousfish |
This allows abbreviations to be expanded by tab completions. Fixes fish-shell#3233
Weird, tab doesn't complete any of my abbrs |
@c02y can you share steps to reproduce - abbreviations that fail and what you try? Thanks |
It seems working again, sorry about that, maybe I just didn't restart fish. |
When typing an abbreviation, it would be really nice if you could hit tab to complete that abbreviation. For example, I have an abbreviation
devgpu
that expands tossh <my_server>
, but when I typedev <tab>
I don't getdevgpu
as a suggestion.While it is a little weird to complete something that's not a real command, I still expected the completion to show up, and it would definitely make things quicker for me.
fish version installed (
fish --version
): 2.3.0OS/terminal used: Mac OS 10.11, iTerm2 3.0.4
The text was updated successfully, but these errors were encountered: