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

Date format supports recent/non-recent format #600

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

manno
Copy link

@manno manno commented Dec 16, 2021

Support newline separator to specify a different date format for recent files.

This is similar to the TIME_STYLE=iso format, however the formats can be freely chosen.
(Also iso can only be set via the env var, not the command line.)

refers to #554


TODO

  • Use cargo fmt
  • Add necessary tests
  • Add changelog entry

@codecov-commenter
Copy link

codecov-commenter commented Dec 22, 2021

Codecov Report

Merging #600 (83d0aec) into master (0a3a6f1) will increase coverage by 0.34%.
The diff coverage is 84.21%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #600      +/-   ##
==========================================
+ Coverage   85.89%   86.23%   +0.34%     
==========================================
  Files          37       37              
  Lines        3849     3996     +147     
==========================================
+ Hits         3306     3446     +140     
- Misses        543      550       +7     
Impacted Files Coverage Δ
src/app.rs 72.46% <59.09%> (-0.12%) ⬇️
src/meta/date.rs 99.41% <100.00%> (+0.86%) ⬆️
src/color.rs 49.14% <0.00%> (-2.05%) ⬇️
src/display.rs 75.00% <0.00%> (-0.41%) ⬇️
src/meta/size.rs 95.40% <0.00%> (ø)
src/icon.rs 97.68% <0.00%> (+0.02%) ⬆️
src/sort.rs 98.26% <0.00%> (+0.32%) ⬆️
src/meta/name.rs 92.88% <0.00%> (+0.44%) ⬆️
src/flags/sorting.rs 99.13% <0.00%> (+0.54%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 0a3a6f1...83d0aec. Read the comment docs.

@manno
Copy link
Author

manno commented Dec 22, 2021

newline='
'
lsd -l --date "+%h %d %H:%M$newline%h %d %Y"

@manno manno marked this pull request as ready for review December 22, 2021 09:19
@manno
Copy link
Author

manno commented Dec 22, 2021

I'm new to Rust, let me know if something is off about this PR.
Should I also update the documentation?

Copy link
Member

@meain meain left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the late response, I was a bit occupied. Just a few suggestions on the PR. Also we could add this info to the man pages (probably also mention the TIME_STYLE env variable).

src/app.rs Outdated Show resolved Hide resolved
src/app.rs Outdated Show resolved Hide resolved
src/meta/date.rs Outdated Show resolved Hide resolved
@manno
Copy link
Author

manno commented Feb 2, 2023

I rebased and added information to the README and Changelog.

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