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

Add info about logical operators for filter patterns, and examples, to help text #559

Closed
vapniks opened this issue Jun 10, 2022 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@vapniks
Copy link

vapniks commented Jun 10, 2022

I have so many different query languages to remember (regexps, xpath, jq,...)
It would be useful to have more info in the help page in case I forget exactly how broot filter queries work (e.g. after not using it for a long while). Maybe some short examples too (e.g. for the tokens search; it took me a while to work out you need to separate tokens with commas).

@vapniks vapniks added the enhancement New feature or request label Jun 10, 2022
@Canop
Copy link
Owner

Canop commented Jun 11, 2022

You mean the help page inside the application or the help site ? I suspect nobody would read the in-app help if it was longer.

@vapniks
Copy link
Author

vapniks commented Jun 11, 2022

I mean the in-app help. The box showing the search prefixes is about half the width of the screen so there's easily enough space for another column showing examples, and perhaps a column with a short explanation. If you did that then I think you could remove lines 2 & 3 below the "Search Modes" header without any loss of comprehension. Those lines could be replaced by a couple of lines stating the logical operators, e.g:

"logical operators !,&,| and parentheses can be used to combine filters, e.g. '(!/foo/)&c/bar/'. For efficiency place content matches last."

This would be enough to prompt memory or figure out how they work.
These logical operators significantly increase the power of broot, so I think it would be worth it.

@Canop
Copy link
Owner

Canop commented Jun 11, 2022

I think you're right.

@Canop Canop self-assigned this Jun 11, 2022
@vapniks
Copy link
Author

vapniks commented Jun 11, 2022

Also IMO it makes more sense to put the "Search Modes" section first (and the "Configuration" section last) on the help page since I suspect that people will be looking at it more frequently than the other stuff (there are 10 different prefixes to remember). When I press ? I have to press PgDwn three times to reach the filter table.

@Canop
Copy link
Owner

Canop commented Jun 12, 2022

image

@Canop Canop closed this as completed in 0dff3a3 Jun 12, 2022
@vapniks
Copy link
Author

vapniks commented Jun 12, 2022

Looks good to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants