You can clone with
HTTPS or Subversion.
This issue tracks a zsh-like menu for completions, as discussed in #84
Note that in typical zsh fashion, the menu system requires some magic to enable, listed at http://www.refining-linux.org/archives/40/ZSH-Gem-5-Menu-selection/
Great feature !
Maybe it could support backtab key (shift+tab) to return back in the list.
It would be useful if you have a very long list of matching completions and you just passed the command you wanted.
This issue tracks proposed improvements to the pager UI. The pager is what prints the list of options when you hit tab.
Here's my thinking on what the goals ought to be:
Inline and interactive. It should not stay onscreen after you're done interacting with it, but it should also not have an entirely separate UI. zsh's listing of the completions below the prompt is very slick, and a good model.
No jarring transitions. The worst experience in the existing pager is when you tab complete and fish_pager takes over your screen with a huge list. Tab completion should never fill your screen without warning.
Non-modal, as far as possible. Much like history search, we should try to avoid sticking the user in a weird mode that requires special input to escape. Cautionary examples include 'reverse-history-search' and "Display all 200 possibilities? (y/n)"
Progressively filterable. If you have a big list of completions, it would be nice if you could filter / search it effectively, to winnow down the options you want.
My thinking on the UI is "progressive disclosure." Tab shows you a short list of completions, with an affordance for listing the rest. Because the initial list is short, it initially requires only a handful of lines.
I've committed work towards a new pager in df60c00 . It can be enabled by setting the 'fish_new_pager' variable to 1. Feedback very much welcome.
Awesome work, looks exciting. The first spontaneous feeling is that it is kind of weird that you can use all arrow keys except one (down). Which kind of makes sense, maybe. But it feels like you move down with tab and arround with all the other keys so you have to user fingers in different places. On the other hand you cannot only use the tab since shift-tab does nothing.
I suggest that shift-tab should move in the oposite direction just like up arrow key does. That would feel more natural for me. Then you can use tab/shift-tab to navigate vertically and the arrow keys (left/right) to navigate horizontally.
Another option would be to allow the down arrow key, but maybe that will hinder some other feature.
Hmm, the down arrow key is supposed to work! Looks like it's a bug that it doesn't.
Heh, this appears to be due to a difference in wc between OS X and Linux.
down-or-search has this code:
set lineno (commandline -L)
set line_count (commandline|wc -l)
commandline -f history-search-forward
commandline -f down-line
On OS X, the wc -l invocation produces a leading tab. This causes it to fail to match the case $line_count line. How funny.
Ok, the wc issue should be fixed as 2139334 , and down arrow should be made to work via 6d13b8b . Thanks for reporting that bug.
Ah, didn't realize it was a bug, but makes sense. Thank you, works very well now. Will keep testing.
It would still be nice to have shift-tab to go backwards though, is that possible or does it have some technical limitation?
Also is there some way to set the color?
It seems it is using the variable fish_color_search_match, but when I do set fish_color_search_match white --bold --background=purple it ignores the text color. I guess it is related to the color being set for the highlighted part of the completion and then reset back explicitly to normal.
set fish_color_search_match white --bold --background=purple
We can definitely support shift-tab going backwards.
It should use the existing "fish_pager_color" colors, which are:
However the existing pager misinterprets at least fish_pager_color_progress (it sets the foreground color as the background), so things might look different.
Just want to say I really enjoy the latest changes, the search felt very natural, very discoverable. Great work!
The only issue I have experienced but haven't really pinpointed is that sometimes when I start a new terminal it displays the search: ___________. Although I can still enter into the prompt as usual, and as soon as I enter a character it will disappear.
Actually I can manage to freeze the search input by entering stuff, erasing it and using arrows up and down frenetically. First it seemed random, but found a way to achive this every time...
Create following directory structure:
Then stand inside this dir, and do following actions:
This operation causes freezing for me every time.
Nice finds! The mysterious search field is probably due to a bool that I failed to initialize.
Mystery search field should be fixed as bfc7818
Freezing should be fixed as 2253c57
Maybe I'm missing it, but is there a way to open all the completions without searching and moving cursor to the bottom? I often need it when I want to use the competions list instead of manual pages to read the option descriptions.
How about double-tapping tab to reveal everything?
Allow double-tapping tab to fully disclose pager, per #291
Double tapping idea is implemented as 8eaabac to see how it feels
I like the double-tapping idea. It's intuitive and doesn't require additional keys. Works nice.
Turn on the new pager by default, as described in #291
de2eea0 turns this on by default.
Kudos for this great feature. I discovered it by accident on checking the logs. And i love it!
I have one small issue: The feature seems to behave different on my various systems. While it works as expected on most systems (precise, old-stable):
On on specific system (saucy) i cannot select / navigate entries with my arrow keys nor is the current selected proposal higlighted:
Same system. The red one is just a telnet session to home.
Any idea what causes this different behaviour?
I reapplied a different color theme in fish_config. It seems my issue is the missing background colouring there?
@bschmid What value do you have set for $fish_color_search_match ?
@ridiculousfish In the working case --background=purple in the non-working case just purple. I never toyed with those vars directly. (Re-)applying themes via fish_config did not help/change them either.
Finally I stumbled upon vared which allowed to me change the value interactively. Thanks for the pointer!
How about making typing '/' synonymous with pressing enter to select a directory candidate? I miss that from zsh. It's easy to type and feels natural.
This is on by default now - ok to close?