-
Notifications
You must be signed in to change notification settings - Fork 125
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
sort by date #50
Comments
Also suggest sorting by file size |
There's an implementation of sort by time (-s m/--sort m) and size (-s L/--sort L), including -r/--reverse direction, available at reduxionist/k/tree/feature/sort-options . @jaromil @k2xl , if you guys could please give it a try and let me know what you think, then once it's looking good to us we can ask @supercrabtree whether he wants to add it, and then, if so, what needs to be done before issuing the PR... Thanks for k @supercrabtree! |
Works great on my setup. For the record, to quickly install your branch with antigen:
|
Hello, I have been neglecting Thanks |
Cool, in that case: using zsh's sort globs as the options was the cleanest approach I saw. Substituting directly made the only change to existing lines a $SORT_GLOB appendix on the glob qualifiers. I subsequently noticed the design specification in #27, however, which suggests implementing the rest of ls's arg spec as is. The backwards-compatibility is one of the main reasons k keeps winning "ls alternative of choice" for me; I've invested too much muscle memory at the console to reprogram the synapses for those options now. Objectively, the average user is unlikely to be as fluent in glob qualifiers as they are with ls arguments, so I think it's worth adding a mapping step to go from ls sort arg input to zsh glob spec commands. Unless you say otherwise, I'll submit a PR for that first and just leave the current branch hanging for now in case you prefer the simpler implementation. In any case, should I rebase on the currently active branches or stick to master? |
Hi, sounds good, please use master as a base branch :) |
Would be real nice to port the equivalent of the
-t
flag inls
to sort by date (most recent last).Very useful for messy home dirs like mine 😅
The text was updated successfully, but these errors were encountered: