Commit Graph
11559 Commits
Author SHA1 Message Date
oech3 5b7596c4ea nohup: build for Windows 2026-09-12 23:32:46 +02:00
Leonard Hecker 9403b78419 uucore: os_str_from_bytes does not need to alloc 2026-09-12 22:57:41 +02:00
xtqqczze 4bae3063c5 cargo: use workspace inheritance for dev-dependencies 2026-09-12 22:51:47 +02:00
Sylvestre Ledru f1272d52aa ls: include the -i/-s prefix in --dired offsets 2026-09-12 22:49:01 +02:00
Sylvestre Ledru 35631b7efd ls: account for the leading color reset in --dired offsets
When LS_COLORS sets a `no` style, ls emits a reset sequence before the
first listed line. Those bytes were written straight to the output
without advancing the //DIRED// line offset, so every reported pair was
short by the length of the reset and pointed inside the escape sequence
instead of at the name.
2026-09-12 22:49:01 +02:00
Sylvestre Ledru 43a7030922 ls: don't panic when writing the --dired trailer fails
print_dired_output ignored the BufWriter it was given and used the print
macros, which panic on a write error, and its flush reported one as a
plain I/O error. Write the trailer through the BufWriter instead, so a
failure is reported as GNU does: "write error", exit 2.

https://github.com/uutils/coreutils/issues/14497
2026-09-12 22:49:01 +02:00
Sylvestre Ledru ae1bb0647f ls: report --dired offsets for the name only
The //DIRED// byte offsets also covered the color escapes around the
name, the -F indicator and the alignment space before an unquoted name.
GNU excludes all three, so Emacs Dired got a name it could not use.

https://bugs.launchpad.net/ubuntu/+source/rust-coreutils/+bug/2147527
2026-09-12 22:49:01 +02:00
Eyüp Can Akman 26879cb974 install: fix EEXIST race losing files in parallel install -D
Concurrent install -D invocations sharing parent directories race in
open_or_create_subdir between stat_at returning NotFound and mkdir_at.
Another process can create the directory in that gap, so our mkdir_at
returns EEXIST. Retry the stat to open the directory the other process
created.

Fixes #12355.
2026-09-12 21:58:16 +02:00
xtqqczze 1554443636 uucore: remove process functions 2026-09-12 16:48:16 +02:00
Devel 8df50eb861 factor: strip error code in stdin error message 2026-09-12 14:47:56 +02:00
Daniel Hofstetter c350a7c5ac pathchk: remove #![allow(unused_must_use)] 2026-09-11 22:01:03 +02:00
Daniel HofstetterandAlejandro Coronado c04ba563aa pathchk: reject empty path in portability mode
Co-Authored-By: Alejandro Coronado <alejandro.coronado.n@gmail.com>
2026-09-11 17:06:51 +02:00
Daniel Hofstetter 8c44cea005 Revert "env: trace the environment changes under -v"
This reverts commit 9408b4f2da.
2026-09-11 17:00:29 +02:00
oech3 b99b457b0e sort: simplify get_unit 2026-09-11 16:42:51 +02:00
oech3 5d76bc37a9 remove some matches! & use .get() 2026-09-11 13:49:29 +02:00
oech3 195f132a16 simplify matches! and inequalities in match 2026-09-11 11:29:30 +02:00
Devel 4a96f35a41 expr: exit with on a write error 2026-09-11 11:02:09 +02:00
Luan Taraschi 26a1091b6f ls: break a tie in the time sort with the name
Every other sort in sort_entries falls back on the name when its key
ties. Sorting by time did not, so entries sharing a timestamp came out
in the order the directory was read in, and since the sort is unstable
that order was not guaranteed either.

GNU ls breaks the tie with the collation rather than with the bytes, so
the comparison Sort::Name already builds is hoisted out of the match and
the fallback uses that same one.
2026-09-11 10:34:03 +02:00
Socialpranker 9408b4f2da env: trace the environment changes under -v
-v printed only the exec, not what it did to the environment first, so
the three lines GNU emits before it were missing:

    $ env -v -u A FOO=1 true
    unset:    A
    setenv:   FOO=1
    executing: true
       arg[0]= 'true'

and 'cleaning environ' for -i. The individual unsets are not logged when
-i is in effect, since it has already emptied the environment.
2026-09-10 10:50:26 +02:00
Leonard Hecker 57b9a49083 dirname: Fix backslash support on Windows 2026-09-10 09:44:50 +02:00
sichen f604ab9158 echo: don't expand \u, \U and \" in -e
GNU's echo recognizes only \a \b \c \e \f \n \r \t \v \\ \0NNN \NNN and
\xHH after -e.  uucore's escape parser is shared with printf, which also
recognizes \", \uHHHH and \UHHHHHHHH, so echo -e picked those up as well:
echo -e '\u0041' printed A instead of \u0041.

Add an EscapeSet parameter alongside the existing OctalParsing one, and
have echo ask for the set without \", \u and \U.  Those three then fall
through to the unknown-escape arm and are emitted verbatim, backslash
included, which is what GNU does.  printf keeps the full set on both its
format-string and %b paths.
2026-09-10 09:26:02 +02:00
Leonard HeckerandAlvaro Figueroa 2c0e1b981f uucore: Fix strip_errno doctest for Windows (#14482)
Co-authored-by: Alvaro Figueroa <alvaro.figueroa@microsoft.com>
2026-09-09 21:17:05 +00:00
Leonard HeckerandAlvaro Figueroa 4280637694 test: Honor PATHEXT on Windows (#14481)
Co-authored-by: Alvaro Figueroa <alvaro.figueroa@microsoft.com>
2026-09-09 21:15:39 +00:00
Devel da3bb2179c chgrp: strip error when changing group of file fails 2026-09-09 22:40:41 +02:00
oech3 7cb784bb66 nice: map Windows Priority Class 2026-09-09 22:40:01 +02:00