Skip to content
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

Use more than 4 rows for completions #2698

Closed
domoritz opened this issue Jan 27, 2016 · 4 comments · Fixed by #9105
Closed

Use more than 4 rows for completions #2698

domoritz opened this issue Jan 27, 2016 · 4 comments · Fixed by #9105

Comments

@domoritz
Copy link

I have a large screen and would like to use more than 4 rows for autosuggestions.

screen shot 2016-01-26 at 20 38 53

I know tat I can hit tab again to get the complete list.

@oranja
Copy link

oranja commented Jan 31, 2016

Supporting this customization is an easy change, but I doubt you will see it in fish, because fish tries to keep configuration options to a minimum. Your chances increase if you get more people who think that it should be customizable to comment here.

Since this is free software, you are always free to do whatever you want with your own copy.
The value you are looking for can be defined here.
You can clone, edit, build and install your own modified fish in a fairly short time.

@krader1961
Copy link
Contributor

I concur with @oranja that this should not be user configurable. This is the type of thing that fish should dynamically configure based on its environment (e.g., the number of rows displayed by the terminal). Assuming enough people feel this should be dynamically sized the question is what should the algorithm be? Should it be scaled linearly to the number of terminal rows; e.g., one autosuggestion line for every six terminal rows? Or should a non-linear equation be used; e.g., 4 autosuggestion lines for terminals up to 30 rows plus one line for every additional four rows up to a maximum of 10 lines? Note that I pulled those numbers out of the air to stimulate discussion and do not mean to imply I think those are good choices.

@domoritz
Copy link
Author

domoritz commented Feb 1, 2016

Thank you @oranja and @krader1961. I think the fundamental problem may be a bit more than just the number of lines that are being shown. The problem is that the suggestions are not that useful but at the same time you want to avoid that the shell input moves too much.

Also, there are many more options that just a fixed number of lines. The suggestions could just take as much space as is available. Or they could use as much space as they need (up to the whole screen size). This seems to be the default in my zsh setup. However, zsh also shows the most common command rather than a random selection. At least for me, fish shows three columns on a large screen and shows the first 4 rows from three columns that wrap somewhere I can't see it. this means some random commands starting with a, then f, then r.

screen shot 2016-01-31 at 15 20 20

This is very arbitrary and I can't imagine that I find a useful command in that list. Moreover, because the suggestions are in three columns, it is hard to read them.

Compare to the suggestions from zsh.

screen shot 2016-01-31 at 15 21 56

Overall, I think I wish fish would show the most useful commands on the first tab and then all commands on the second tab. The most useful suggestions could either be a fixed number, fill the shell (and if there is no space, use n lines but also don't show more than m lines), or always fill the whole screen (move the input to the top. I prefer a fixed number that actually doesn't change with the screen size because what I can read doesn't change with the size.

@ridiculousfish ridiculousfish added this to the fish-future milestone Feb 1, 2016
@faho faho changed the title Set the number of rows/lines for suggestions Set the number of rows/lines for completions Jan 7, 2017
@xylix
Copy link

xylix commented Apr 5, 2020

+1 to this. I'd even be fine with the option to write my own function for how to display suggestions.

faho added a commit to faho/fish-shell that referenced this issue Aug 2, 2022
This removes that bit where we only show 4 rows at most at first,
instead we disclose up to the full terminal height.

This results in less pressing of tab to get the other results, and
better visibility of results.

However, it also means that it'll push the shell up to the top of the
terminal a lot.

So this is an experiment to see how that works in practice.

Fixes fish-shell#2698
faho added a commit to faho/fish-shell that referenced this issue Aug 8, 2022
This removes that bit where we only show 4 rows at most at first,
instead we disclose up to the full terminal height.

This results in less pressing of tab to get the other results, and
better visibility of results.

However, it also means that it'll push the shell up to the top of the
terminal a lot.

So this is an experiment to see how that works in practice.

Fixes fish-shell#2698
@faho faho closed this as completed in #9105 Aug 9, 2022
faho added a commit that referenced this issue Aug 9, 2022
* Disclose pager to screen height immediately

This removes that bit where we only show 4 rows at most at first,
instead we disclose between half of terminal height up to the full terminal height (but still at least 4 rows).

This results in less pressing of tab to get the other results, and
better visibility of results.

Unlike moving it to the actual top of the screen, it's not as jarring and doesn't push terminal history off-screen as much.

Fixes #2698
@faho faho modified the milestones: fish-future, fish 3.6.0 Aug 13, 2022
@faho faho changed the title Set the number of rows/lines for completions Use more than 4 rows for completions Aug 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants