lsd icon indicating copy to clipboard operation
lsd copied to clipboard

Allow sorting files based on access, modification, or creation times

Open uggla opened this issue 1 year ago • 5 comments

Hello,

I needed to list files based on their creation (birth) time, but unfortunately, lsd did not support this functionality.

This PR introduces the ftime option, which, when used alongside the -t option, allows listing files ordered by access, modification, or creation (birth) time. This implementation addresses the requirements of #1002.

This PR consists of two commits:

  • The first commit introduces the new ftime option.
  • The second commit updates the code to retrieve the appropriate file time (access, modification, or creation) in the metadata.

TODO

  • [X] Use cargo fmt
  • [X] Add necessary tests
  • [X] Update man page at lsd/doc/lsd.md (if applicable)

uggla avatar Nov 29 '24 17:11 uggla

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: uggla Once this PR has been reviewed and has the lgtm label, please assign zwpaper for approval by writing /assign @zwpaper in a comment. For more information see:The Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment Approvers can cancel approval by writing /approve cancel in a comment

muniu-bot[bot] avatar Nov 29 '24 17:11 muniu-bot[bot]

/lgtm

uggla avatar Dec 13 '24 13:12 uggla

@uggla: you cannot LGTM your own PR.

In response to this:

/lgtm

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

muniu-bot[bot] avatar Dec 13 '24 13:12 muniu-bot[bot]

/cc

uggla avatar Dec 13 '24 17:12 uggla

@uggla: GitHub didn't allow me to request PR reviews from the following users: uggla.

Note that only lsd-rs members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

muniu-bot[bot] avatar Dec 13 '24 17:12 muniu-bot[bot]