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

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

uggla
Copy link

@uggla uggla commented Nov 29, 2024

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

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

- This argument can take 3 value atime (access), btime(birth),
  mtime(modification).
- This argument will be used to change the file time displayed
  accordingly.
@uggla uggla requested a review from zwpaper as a code owner November 29, 2024 17:01
Copy link

muniu-bot bot commented Nov 29, 2024

[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 muniu-bot bot added the size/XL label Nov 29, 2024
@uggla uggla changed the title Allow sorting files based on access, modification, or creation times (#1002). Allow sorting files based on access, modification, or creation times Nov 29, 2024
time) based on the arguments specified in the ftime command-line option.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant