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

Document sort actions #2004

Merged
merged 1 commit into from
Feb 22, 2025
Merged

Document sort actions #2004

merged 1 commit into from
Feb 22, 2025

Conversation

MatthiasKunnen
Copy link
Contributor

The actions in the Sort toggles (t) prompt were not very clear to me and lead to a lot of looking up with some confusion:
'a'u/'d'u/'e'xt/'r'ev/'s'z/'t'm/'v'er/'c'lr/'^T'?

So I dove into the source to find out what all the options do and added a help option.
Now, when responding to the prompt with ?, the info of the options is displayed. This follows the Don't memorize! approach taken by nnn.

The same approach as the general help is employed. I have looked into reusing the same code for both help functions but did not find a clean way to do it.

Regarding the order of the usage info, I debated between same order as the prompt, alphabetical, and grouped by type (e.g. all file size/disk usage together) and decided on alphabetical. If you would like prompt order, or any other order, let me know.

The binary size did not increase, to my surprise, it stayed at 126 440 B (compiled on x64 Arch Linux, gcc 14.2.1 20250207).

MatthiasKunnen added a commit to MatthiasKunnen/nnn that referenced this pull request Feb 22, 2025
@MatthiasKunnen MatthiasKunnen changed the title Add usage info to sort actions Document sort actions Feb 22, 2025
@jarun
Copy link
Owner

jarun commented Feb 22, 2025

Can you please squash all the commits into one?

- Document sort order in the man page
- Fix typo in zsh completion
- Explain sort order options in fish completions
@MatthiasKunnen
Copy link
Contributor Author

Can you please squash all the commits into one?

Done

@jarun jarun merged commit dfdef9d into jarun:master Feb 22, 2025
8 checks passed
@jarun
Copy link
Owner

jarun commented Feb 22, 2025

Thank you!

@MatthiasKunnen
Copy link
Contributor Author

Happy to contribute! :)

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

Successfully merging this pull request may close these issues.

3 participants