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

Prompt when there are too many results #97

Closed
wtsnjp opened this issue Feb 24, 2023 · 2 comments
Closed

Prompt when there are too many results #97

wtsnjp opened this issue Feb 24, 2023 · 2 comments
Labels
change Changing program's behavior cli Command-line interface

Comments

@wtsnjp
Copy link
Member

wtsnjp commented Feb 24, 2023

Currently, in list mode, when there are more results than max_lines, only a prompt asking if the entire list should be displayed, is shown.

$ texdoc -l plain
96 results. Display them all? (y/N)

To minimize the number of user interactions, I think it would be better to show the top max_lines results from the beginning and change to a prompt asking if more should be shown.

$ texdoc -l plain
96 results. Only the top 20 are shown below.
 1 /usr/local/texlive/2023/texmf-dist/doc/plain/font-change/font-change.pdf
   = Package documentation
 2 /usr/local/texlive/2023/texmf-dist/doc/plain/fontch/fontch.pdf
   = Package documentation
 3 /usr/local/texlive/2023/texmf-dist/doc/plain/gentle/gentle.pdf
   = The document itself
...
20 /usr/local/texlive/2023/texmf-dist/doc/plain/impatient-fr/fbook.pdf
   = [fr] A copy of the book (French translation)
Enter number of file to view, the Return key to view 1, S to show all results, or any other key to exit: 
@wtsnjp wtsnjp added change Changing program's behavior cli Command-line interface labels Feb 24, 2023
@kberry
Copy link
Contributor

kberry commented Feb 24, 2023 via email

@wtsnjp
Copy link
Member Author

wtsnjp commented Feb 25, 2023

20 is the current default value for max_lines. I can lower that default to 10 to accommodate this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change Changing program's behavior cli Command-line interface
Projects
None yet
Development

No branches or pull requests

2 participants