-
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
only long options can be selected from completion pager #5634
Comments
I actually prefer long options for things I'm not typing non-stop because it's easier to search history and understand what was going on at the time. But I exclusively do so by typing |
Yeah, I prefer the long options for many things that aren't used daily, I don't mean to give them the short shrift overall. It's just problematic that one cannot get the completion system to complete short options. |
Yeehaw, this is fixed. As a bonus with the short options first, since they're all two characters wide, things line up in columns nicer: I'm also now sorting |
Test changes added for fish-shell#5634 in 6e525cc.
If a command has a completion that has both a short and long variant with the same description, it's not possible to select an item in the pager and have the short option go onto the command line. The entires are coalesced into the same row on the pager, and the long option is always placed on the command line.
Having stuff like
patch --strip 0 --directory src < file.patch
in history is annoying. Having commands that are really long makes autosuggestions harder to see in entirety, and when the long format is something the person usually does not use, you will not get history matches against previous times you've typed the command normally using the short options. It's unusual for anyone to actually use the long options for many system utilities, and this is also true for a lot of our builtins, thinkcommand -s foo
.If we changed the behavior so that the short option is picked instead out of the two when a pager item with both forms is selected, this would allow the user to pick what they want, because they could still type
--<TAB>
to get the long one.I do not think UX is harmed, because the user doesn't benefit from the self-documenting feature of long options here: they already saw the description in the pager, this was selected interactively, they know exactly what the option does.
The text was updated successfully, but these errors were encountered: