-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Implement TIME_STYLE="+DATE" ls
#3625
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
Comments
Hi. I would also like to try this issue. I have made some progress, and technically it works except for the clap validation, see pr 8000 oblem on a question I made to clap-repo. Basically right now we have value_parser!, but not supporting +FORMAT. Thus, by supporting +FORMAT, it cannot match the string anymore, but rather a user defined string with the In my question to clap, the maintainer suggested something, and I tried some stuff but it looks so far a bit beyond my capabilities, so if anyone has any other ideas, lets discuss :) |
Hi! Sounds very promising! You could always remove the parsing from clap, accept any string and then manually parse the string value later. What argument is this about by the way? In the issue I only see an environment variable, which clap should not have anything to do with right? |
Hi! Your initial suggestion seems like doable. The argument is |
Yeah we indeed lose the message and we'd need some custom message instead, but I'm not sure that the message from clap would still be as nice with a custom value_parser. |
We already support TIME_STYLE as an environment variable but only with the 4 different values.
GNU allows the use of +date
For example:
GNU supports the date format (like the date or touch commands)
https://github.com/uutils/coreutils/blob/main/src/uu/date/src/date.rs
https://github.com/uutils/coreutils/blob/main/src/uu/touch/src/touch.rs
Tests in:
https://github.com/coreutils/coreutils/blob/master/tests/ls/color-term.sh#L23=
The text was updated successfully, but these errors were encountered: