Nicolas Boichat
b13bf37f7b
util/build-gnu.sh: Change string matching for tests/ls/time-style-diag.sh
...
We now are closer to what GNU prints, and handle the [posix-] cases
that they do.
2025-07-30 19:45:29 +08:00
Nicolas Boichat
4cb57fb7ac
ls: cleanup imports
...
They were a bit jumbled with no particular logic, at least that
I could see.
2025-07-30 17:59:52 +08:00
Nicolas Boichat
4ba8d3e0a9
ls: Fix Windows build
2025-07-30 17:58:39 +08:00
Nicolas Boichat
2d63020cd9
du: Add support for reading time-style from environment
...
Similar as what ls does, but du has an extra compatibility layer
described in the GNU manual (and that upstream dev helped me
understand: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=79113 ).
2025-07-30 17:27:22 +08:00
Nicolas Boichat
b99615c1e3
du/ls: Move common time formats to constants in uucore/time
...
Along the way:
- Fix the full-iso format, that was supposed to use %N, not %f
(%f padded with chrono, but not with jiff, and %N is more correct
and what GNU says in their manual)
- The Hashmap thing in parse_time_style was too smart, to a point
that it became too unflexible (it would have been even worse
when we added locale support).
I was hoping the share more of the code, but that seems difficult.
2025-07-30 17:27:22 +08:00
Nicolas Boichat
1272bfc222
du: Add support for +FORMAT time-style
...
Also add to error text, which... GNU coreutils doesn't do for
some reason.
2025-07-30 17:27:22 +08:00
Nicolas Boichat
fc08fa1d62
ls: Print dates in the future as "old" ones
...
ls has different time format for recent (< 6 months) and older files.
Files in the future (even by just a second), are considered old,
which makes sense as we probably want the date to be printed in
that case.
2025-07-30 17:27:22 +08:00
Nicolas Boichat
4901f370cb
ls: Add support for newline separated format for recent/older
...
Documented in GNU manual.
Also improve test_ls to test for both recent and older files.
2025-07-30 17:27:22 +08:00
Nicolas Boichat
e5f2f79ea1
ls: Allow reading time-style from TIME_STYLE environment variable
...
According to GNU manual.
2025-07-30 17:27:22 +08:00
Nicolas Boichat
a1519e1b74
ls: Add support for --time-style=posix-*
...
From GNU manual, if LC_TIME=POSIX, then the "locale" timestamp is
used. Else, `posix-` is stripped and the format is parsed as usual.
Also, just move the whole text to the locale file, instead
of trying to generate it manually.
2025-07-30 17:27:20 +08:00
Sylvestre Ledru
e48c4a7b96
Merge pull request #8398 from drinkcat/stat-bigtime
...
`stat`: Convert to use `uucore` functions
2025-07-30 10:18:23 +02:00
Sylvestre Ledru
a055e856dd
fix rustfmt
2025-07-30 09:51:14 +02:00
Sylvestre Ledru
e68f73489c
Merge branch 'main' into stat-bigtime
2025-07-30 09:29:19 +02:00
Daniel Hofstetter
4a68e3d05c
Merge pull request #8414 from uutils/renovate/clap-4.x-lockfile
...
chore(deps): update rust crate clap to v4.5.42
2025-07-30 07:46:53 +02:00
renovate[bot]
4b37f6d48d
chore(deps): update rust crate clap to v4.5.42
2025-07-30 05:04:00 +00:00
Dorian Péron
2307a353ea
Merge pull request #8406 from amirhosseinghanipour/refactor-mkdir-mode-parsing
...
refactor(mkdir): Simplify mode argument parsing
2025-07-29 22:02:34 +02:00
Dorian Péron
614531d13c
Merge branch 'main' into refactor-mkdir-mode-parsing
2025-07-29 22:01:53 +02:00
Sylvestre Ledru
35610ba146
Merge pull request #8413 from cakebaker/mv_improve_is_empty_dir
...
mv: use `next()` instead of `peekable().peek()` in `is_empty_dir()`
2025-07-29 17:25:47 +02:00
Sylvestre Ledru
3a214f2842
Merge branch 'main' into refactor-mkdir-mode-parsing
2025-07-29 16:54:15 +02:00
Daniel Hofstetter
000be5b73a
mv: use next() instead of peekable().peek()
...
in is_empty_dir()
2025-07-29 16:52:06 +02:00
Amirhossein Ghanipour
8c9e739694
refactor(mkdir): Simplify mode argument parsing
2025-07-29 15:11:35 +03:30
Daniel Hofstetter
790852ff9a
Merge pull request #8403 from sylvestre/ls-others
...
ls: improve the test when running selinux
2025-07-29 12:51:54 +02:00
Sylvestre Ledru
386acd00d6
Merge pull request #8412 from julian-klode/fix-install-no-target-existing-target
...
install: Fix --no-target-directory with existing file
2025-07-29 12:46:40 +02:00
Julian Andres Klode
190ddd105c
install: Fix --no-target-directory with existing file
...
install should silently override existing target files, but it
inadvertently checked whether the target exists rather than
for the target being a directory, hence the overwrite failed,
saying it cannot overwrite the directory with non-directory.
Bug-Ubuntu: https://bugs.launchpad.net/bugs/2118785
2025-07-29 12:24:31 +02:00
Jonas Jelten
79bbf52a21
Merge pull request #8343 from TheJJ/fix-mknod-mode
...
mknod: set cli specified file mode even when it's 0o666
2025-07-29 11:53:21 +02:00