Commit graph

6765 commits

Author SHA1 Message Date
Sylvestre Ledru
505ef714b9 rm: In some cases, remove_dir is doing a better job than remove_dir_all
use it when remove_dir_all failed

GNU compatibility (rm/empty-inacc.sh)
2023-10-14 12:09:27 +02:00
Zhuoxun Yang
ae1c4ccfd2 expr: short-circuit evaluation for & 2023-10-14 01:56:38 +08:00
Daniel Hofstetter
5f4305df6f
Merge pull request #5394 from sylvestre/fs
fs: split get_file_display into its function & add test
2023-10-13 16:51:56 +02:00
Sylvestre Ledru
3cd5f9d175
Merge pull request #5401 from cakebaker/clippy_suppress_cognitive_complexity_warning
clippy: suppress cognitive_complexity lint in some tests
2023-10-13 15:41:35 +02:00
Daniel Hofstetter
a69d48fb8c clippy: suppress cognitive_complexity lint 2023-10-13 14:53:32 +02:00
Daniel Hofstetter
617de9b636
Merge pull request #5397 from sylvestre/ls-42
ls: Document a bit tests/ls/stat-dtype.sh
2023-10-13 14:38:31 +02:00
Sylvestre Ledru
8931cfa93d
improve the wordin
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2023-10-13 11:18:00 +02:00
Sylvestre Ledru
8826e47d36
ignore dtype in the spell 2023-10-13 10:30:31 +02:00
Daniel Hofstetter
f1f4823feb who: suppress cognitive_complexity lint 2023-10-13 08:26:06 +02:00
Sylvestre Ledru
94972d45c7 ls: Document a bit tests/ls/stat-dtype.sh 2023-10-12 23:37:07 +02:00
Sylvestre Ledru
29a5a13ce6 fs: split get_file_display into its function 2023-10-12 20:41:48 +02:00
tommady
c9fa07035b
fix linter errors 2023-10-12 02:52:02 +00:00
tommady
9be5583d36
Update src/uu/cp/src/cp.rs
Co-authored-by: Sylvestre Ledru <sledru@mozilla.com>
2023-10-12 10:42:52 +08:00
tommady
7ea19c7c5d
Update src/uu/cp/src/cp.rs
Co-authored-by: Sylvestre Ledru <sledru@mozilla.com>
2023-10-12 10:42:44 +08:00
zhitkoff
a920464952 split: undocumented options aliases + help fix 2023-10-11 12:13:22 -04:00
tommady
254007ffe0
Merge branch 'main' into fix-5327 2023-10-11 18:15:18 +08:00
tommady
c59b0f11fd
fix linter 2023-10-11 08:57:04 +00:00
tommady
edb5b65b01
Merge branch 'main' of github.com:uutils/coreutils into fix-5327 2023-10-11 08:39:52 +00:00
tommady
78e1eae1ef
address comment 2023-10-11 08:29:13 +00:00
Miles Liu
3b971e4806
ls: move to uutils-term-grid 2023-10-11 16:26:36 +08:00
tommady
6cb0d5ad7d
add comment for explicit in the Preserve enum 2023-10-11 07:53:03 +00:00
Sylvestre Ledru
f3f82c14af
Merge pull request #5381 from howard0su/df_wsl
Fix overflow error on WSL. Default to 0 when the values are non-sense.
2023-10-10 13:10:40 +02:00
Sylvestre Ledru
95a1a08de3
Add two words to the ignore spell list 2023-10-10 09:07:32 +02:00
Daniel Hofstetter
c70a47fa93
Merge pull request #5329 from KAAtheWiseGit/main
`mkdir`: make `mkdir` public and document it
2023-10-10 08:21:17 +02:00
Howard Su
d2cacdfce2 Fix overflow error on WSL. Default to 0 when the values are non-sense. 2023-10-09 22:16:09 +08:00
Sylvestre Ledru
b802c8cc3f
Merge branch 'main' into clippy2 2023-10-09 15:49:25 +02:00
Sylvestre Ledru
0695437de2
Merge pull request #5385 from cakebaker/uucore_remove_commented_out_enum
uucore: remove commented out enum FChar
2023-10-09 15:39:38 +02:00
Daniel Hofstetter
b38ac2cb74 uucore: remove commented out enum FChar 2023-10-09 15:28:12 +02:00
Daniel Hofstetter
2883c0a968 uucore: remove commented out import 2023-10-09 15:16:50 +02:00
Sylvestre Ledru
8e8a91be5d Ignore more cognitive_complexity 2023-10-08 17:46:11 +02:00
Daniel Hofstetter
7e08562ee6 expr: add some empty lines 2023-10-08 15:02:01 +02:00
Daniel Hofstetter
94f5fa9487
Merge pull request #5365 from Luv-Ray/fix-expr
`expr`: short-circuit evaluation for `|`
2023-10-08 14:55:59 +02:00
Sylvestre Ledru
c53ca6d6fc
Merge pull request #5372 from sanpii/ls-panic
ls: fix panic when file removed too quickly
2023-10-08 10:54:19 +02:00
Daniel Hofstetter
1038508a58
Merge pull request #5335 from PThorpe92/mv_nushell
mv: expose main functionality for nushell
2023-10-07 16:46:45 +02:00
Sylvestre Ledru
77c120db2d
Merge pull request #5373 from cakebaker/head_add_some_empty_lines
head: add some empty lines
2023-10-07 16:32:41 +02:00
Daniel Hofstetter
f86469f6d5 head: add some empty lines 2023-10-07 16:04:21 +02:00
Daniel Hofstetter
2ba7400d05 clippy: suppress cognitive_complexity lint
for two functions
2023-10-07 15:15:44 +02:00
Sylvestre Ledru
3e1d3caceb
head: remove clippy::cognitive_complexity by moving some content in a function (#5366)
* head: remove a clippy::cognitive_complexity by moving some content into a function

* Remove duplicate comment
2023-10-07 13:37:24 +02:00
Sanpi
e1b7f254a6
ls: fix panic when file removed too quickly
Fixes #5371
2023-10-07 12:57:05 +02:00
Sylvestre Ledru
a596cda516
Merge pull request #5355 from boxdot/main
relpath: remove
2023-10-06 20:39:25 +02:00
Luv_Ray
0df561e256
expr: add comment in syntax_tree.rs 2023-10-07 00:19:56 +08:00
Zhuoxun Yang
2c2e01205c expr: short-circuit evaluation for | 2023-10-06 23:50:22 +08:00
PThorpe92
4a44a106a0
feat: expose mv externals + document for nushell 2023-10-06 11:34:06 -04:00
PThorpe92
6091bafe08
feat(mv): expose functionality, document for nushell 2023-10-06 11:33:58 -04:00
Zhuoxun Yang
fa2a14ccd2 expr: unify debug message 2023-10-06 22:55:30 +08:00
Daniel Hofstetter
7d39b1ade5
Merge pull request #5359 from sylvestre/chown-sim
chown: move uid & gid detections into their own functions
2023-10-06 09:00:03 +02:00
Daniel Hofstetter
4760b1f340
chown: remove unnecessary return 2023-10-06 07:49:36 +02:00
terade
f18e8983b1 rm: Refactor prompt_file, lower nesting depth
Addressing issue #5345.
Introduce new helper function: prompt_file_permission_read_only
2023-10-06 01:39:59 +02:00
Sylvestre Ledru
d756a05be6 touch: fix clippy warning - redundant guard 2023-10-05 19:18:00 +02:00
Sylvestre Ledru
b87e1f5676 chown: move uid & gid detections into their own functions 2023-10-05 19:06:46 +02:00
boxdot
e88183174b
relpath: remove
Closes #5236
2023-10-04 16:13:06 +02:00
tommady
aaea3b40fb
fix freebsd typo 2023-10-04 09:16:54 +00:00
tommady
5ce3720820
fix freebds mode_t is u16 but other unix platforms are u32 2023-10-04 09:12:26 +00:00
tommady
6c05385d77
fix macos-12 mode_t is u16 but other unix platforms are u32 2023-10-04 08:31:07 +00:00
tommady
74c393974c
fix android mode_t is u16 but other unix platforms are u32 2023-10-04 08:17:40 +00:00
tommady
879b4f363d
Merge branch 'main' into fix-5327 2023-10-04 16:06:48 +08:00
tommady
cdde57608c
fix macos mode_t is u16 but other unix platforms are u32 2023-10-04 08:06:30 +00:00
tommady
88f88e51cc
fix expected , found and spelling errors 2023-10-04 07:12:25 +00:00
tommady
6c30a1df78
fix-5327 2023-10-04 06:04:46 +00:00
Daniel Hofstetter
c29bcb219f echo: don't output "\n" if "\c" is encountered 2023-10-03 14:37:15 +02:00
Daniel Hofstetter
139f205783
Merge pull request #5218 from tertsdiepraam/echo-fix-octal-wrapping
`echo`: fix wrapping behavior of octal sequences
2023-10-03 13:52:56 +02:00
Terts Diepraam
a107374c82 echo: use controlflow instead of bool 2023-10-03 12:10:20 +02:00
Terts Diepraam
689b21d0b8
Merge pull request #5348 from cakebaker/cp_show_no_skipped_message
cp: show no "skipped" msg with -vi/-vin
2023-10-03 11:58:47 +02:00
Terts Diepraam
0f248d7525
Merge pull request #5347 from cakebaker/mv_show_no_skipped_message
mv: show no "skipped" msg with -vi/-vin
2023-10-03 11:58:31 +02:00
PGIII
252d01ac33
cp: fail when trying to copy to read only file on mac (#5261)
* cp: fail when trying to copy to read only file

* fix spelling error in macos.rs

* simplify permissions check

* add comment

* fix typo
2023-10-03 00:48:22 +02:00
Yury Zhytkou
c5a0aa92f8
split: implementing separator option (#5331)
* split: implementing separator option

* split: separator option - handle multiple update

* split: style

* split: separator tests

* split: separator tests - stdin in ci/cd

* split: tests - ci/cd stdin errors

* split: refactor based on feedback

* split: improve test coverage

* split: fix broken pipe error in tests with stdin

* split: fix for handle_multiple_separator_options

* split: comments

* split: refactor separator code

* split: changes based on feedback

* split: changes based on feedback
2023-10-03 00:42:46 +02:00
Daniel Hofstetter
8ee69d2b92 cp: show no "skipped" msg with -vi/-vin 2023-10-02 15:38:34 +02:00
Daniel Hofstetter
fda762b91c mv: show no "skipped" msg with -vi/-vin 2023-10-02 14:50:29 +02:00
Daniel Clarke
c27fcc4084
Update parse_datetime to 0.5.0 (#5313) 2023-10-01 18:01:46 +02:00
Daniel Hofstetter
95ccc54d05 nl: defer showing "line number overflow" error 2023-09-30 15:35:05 +02:00
Daniel Hofstetter
bc7877b58c
Merge pull request #5124 from shinhs0506/seq-parse
seq: parse "infinity" and "-infinity"
2023-09-30 06:59:32 +02:00
Daniel Hofstetter
035032cd83
Merge pull request #5158 from cakebaker/nl_section_delimiter
nl: implement -d/--section-delimiter
2023-09-29 10:42:04 +02:00
Daniel Hofstetter
1a87c31b1e
Merge pull request #5336 from sylvestre/isdigit
Replace list of digit by is_digit
2023-09-29 10:32:07 +02:00
Sylvestre Ledru
55fd1f3617 Replace list of digit by is_ascii_digit
and some ride along simplification
2023-09-28 23:07:01 +02:00
Daniel Hofstetter
51eb20a15d fmt: use clap's value parser for goal & width 2023-09-28 10:50:56 +02:00
John Shin
9c0b9cae56 seq: simplyfy nan and inf parsing 2023-09-27 14:55:08 -07:00
KAA the Wise
aea986948d mkdir: make mkdir public and document it
- Made the `mkdir` function public.  Added documentation, describing the
  behavior and parameters
- Moved the GNU dot-stripping behavior from `exec` to `mkdir`.
2023-09-27 23:08:08 +03:00
tommady
2789885648
cp: fix cp -dR --no-preserve=links d c should have different inodes (#5320)
* fix issue 5308
2023-09-27 13:16:10 +02:00
Daniel Hofstetter
ff500d7d6f expr: interpret numbers != 0 as true for | and & 2023-09-26 16:24:00 +02:00
Sylvestre Ledru
265c258713 ranges: add unit tests to verify the parsing
To test them:
$ cargo test -p uucore --features ranges
2023-09-26 09:40:21 +02:00
Sylvestre Ledru
99120d32c1 cut: fail when the input == usize::MAX 2023-09-26 09:40:21 +02:00
Terts Diepraam
45487d47b8 extract Base enum 2023-09-25 12:02:45 +02:00
renovate[bot]
6aba3a4d67
fix(deps): update rust crate wild to 2.2 2023-09-24 20:04:53 +00:00
Daniel Hofstetter
31d32e3ee2
Merge pull request #5310 from tertsdiepraam/expose-whoami
Expose `whoami` function (for nushell!)
2023-09-24 15:24:42 +02:00
Sylvestre Ledru
1c03d1614c
Merge pull request #4199 from cakebaker/tail_remove_unused_var_rename_other_var
tail: remove unused "_event_counter"; rename "_timeout_counter" to "timeout_counter"
2023-09-24 14:47:33 +02:00
Leviticoh
b90b59c003
uniq: added support for deprecated -N option (#4228) 2023-09-24 14:44:44 +02:00
Sylvestre Ledru
e8b27d1714
Merge pull request #4527 from bbara/dd-skip-seek
dd: fix GNU test 'dd/skip-seek-past-dev'
2023-09-24 14:43:15 +02:00
Terts Diepraam
1dcf3e6353 expose whoami function (for nushell!) 2023-09-24 14:13:16 +02:00
Terts Diepraam
4ca792d2ff
Merge pull request #5306 from cakebaker/nl_fix_output_order_if_stdin_and_files_are_mixed
nl: fix output order if stdin and files are mixed
2023-09-24 12:12:54 +02:00
Terts Diepraam
50255a2463
Merge pull request #5305 from sylvestre/dired-prefix
ls --dired: replace the previous "total: xx" padding method
2023-09-24 12:09:26 +02:00
tommady
bd0fb817a7
cp: fix the result of inodes are not the same when preserve links is flagged (#5064)
Should fix:
```
rm -rf a b c
touch a
ln -s a b
mkdir c
./target/debug/coreutils cp --preserve=links -R -H a b c
a_inode=$(ls -i c/a|sed 's,c/.*,,')
b_inode=$(ls -i c/b|sed 's,c/.*,,')
echo "$a_inode" = "$b_inode"
```
2023-09-24 10:53:27 +02:00
Benjamin Bara
8a9b29ddfb dd: fix GNU test 'dd/skip-seek-past-dev' 2023-09-24 10:00:10 +02:00
Daniel Hofstetter
a4a69c8ee7 tail: "_timeout_counter" -> "timeout_counter" 2023-09-24 09:59:06 +02:00
Daniel Hofstetter
306a58a731 tail: remove unused var "_event_counter" 2023-09-24 09:59:06 +02:00
Sylvestre Ledru
e2e42ac265
Merge pull request #5304 from KAAtheWiseGit/main
`rm`: make the utility public
2023-09-23 18:38:25 +02:00
KAA the Wise
4b76b2f332 rm: document PromptProtected interactive mode option 2023-09-23 15:57:30 +03:00
Daniel Hofstetter
06219350fa nl: fix output order if stdin and files are mixed 2023-09-23 14:44:30 +02:00
Sylvestre Ledru
ba3f266b2c
Merge pull request #5285 from cakebaker/nl_multiple_files
nl: make line number and --join-blank-lines work over multiple files
2023-09-23 09:34:04 +02:00
Sylvestre Ledru
48613b4717 ls --dired: replace the previous "total: xx" padding method
by something easier
2023-09-23 09:31:16 +02:00
KAA the Wise
20fb473da8 rm: make the remove function public 2023-09-22 19:18:27 +03:00
KAA the Wise
75044c1bc4 rm: make option types public
Made `Options` and `InteractiveMode` public and added documentation for them.
2023-09-22 19:17:24 +03:00
Daniel Hofstetter
38831c46d1 relpath: show error if no argument provided
Fixes #5300
2023-09-22 10:58:12 +02:00
Sylvestre Ledru
a12dd2ee1e ls rename the function for consistency 2023-09-21 21:23:08 +02:00
Sylvestre Ledru
8db6146dd3 ls remove old comment 2023-09-21 21:22:27 +02:00
Sylvestre Ledru
1d10e0c674 ls: rename the function for something more explicit 2023-09-21 21:22:24 +02:00
pin
23ee9b622d
Add NetBSD support to uucore. (#5289)
* Add NetBSD support to uucore.

Fixes https://github.com/uutils/coreutils/issues/5288
2023-09-21 12:24:08 +02:00
Sylvestre Ledru
9b4d2c6bc4
ls: implement --dired
* Support ls --dired

* stat-failed.sh: update of the test - we have a small difference

* ls --dired: address some of the comments

* fix warnings

* use unwrap()

* Improve test

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>

* Simplify test

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>

* Remove a word from the spell ignore

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>

* remove duplication of the spell ignore

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>

* rustfmt

---------

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2023-09-20 08:17:46 +02:00
Daniel Hofstetter
1a30a1b8b6 nl: support --join-blank-lines over multiple files 2023-09-19 10:47:20 +02:00
Daniel Hofstetter
1107fadca9 nl: increase line number over multiple files 2023-09-19 10:47:00 +02:00
Rojin Raju
d01fe6a10f
ls.rs: rename variable name dfn to displayed_file
Closes: #5282
2023-09-18 21:47:02 +02:00
renovate[bot]
416a4832b8
fix(deps): update rust crate dns-lookup to 2.0.3 2023-09-17 17:46:16 +00:00
Sylvestre Ledru
37ee889003 ls -l: show an error when symlink not readable
switching to match and handle the error

Will help with tests/ls/stat-failed.sh
2023-09-15 22:34:17 +02:00
Daniel Hofstetter
39a0e92a91
Merge pull request #5255 from granquet/split_filter_broken_pipe
split: catch broken pipe error for round robin strategy
2023-09-13 14:08:45 +02:00
Daniel Hofstetter
aa7b39ae49 split: fix formatting 2023-09-13 10:45:38 +02:00
Guillaume Ranquet
d4217c5a12 split: catch broken pipe error for round robin strategy
The broken pipe error is not handled in the case of the round robin
strategy (typically used with --filter).

Align to the other strategies to silence that error in that use case
too.

fixes #5191

Signed-off-by: Guillaume Ranquet <granquet@baylibre.com>
2023-09-12 17:43:31 +02:00
Daniel Hofstetter
6ce80758d5 touch: fix deprecation warnings from chrono
datetime_from_str() has been deprecated
2023-09-12 15:08:21 +02:00
Daniel Hofstetter
6d0bac2842 ls: use OnceCell from std instead of once_cell 2023-09-11 16:05:19 +02:00
Sylvestre Ledru
6186c8c324
Merge pull request #5258 from cakebaker/bump_nix_and_ctrlc
Bump nix & ctrlc, adapt stty to nix API changes
2023-09-10 17:17:25 +02:00
Daniel Hofstetter
d19b8b78d8 uucore: turn quoting_style into a feature 2023-09-10 15:07:37 +02:00
David CARLIER
7679e90818
clippy: remove some unnecessary mut
removing useless mutability mostly.
2023-09-09 09:47:08 +02:00
Daniel Hofstetter
36d5013fac stty: adapt to API change in nix 0.27.x
tcgetattr(fd: RawFd) changed to tcgetattr<Fd: AsFd>(fd: Fd), with RawFd
not implementing AsFd. A similar change was applied to tcsetattr.
2023-09-08 11:06:21 +02:00
Daniel Hofstetter
5935602bad
Merge pull request #5260 from sylvestre/echo-doc
echo's doc doesn't show correctly
2023-09-08 07:11:12 +02:00
Sylvestre Ledru
a63603eea8 echo's doc doesn't show correctly 2023-09-07 22:08:22 +02:00
David CARLIER
e3f6fd3c3f truncate clippy fix. 2023-09-07 20:48:26 +01:00
Sylvestre Ledru
80f8eb6724
Merge pull request #5252 from zhitkoff/split-gnu-test-fail.sh
split: implement remaining -n variants and pass GNU tests/split/fail.sh
2023-09-07 17:15:09 +02:00
zhitkoff
3be284e0d9 split: more test coverage 2023-09-06 19:49:26 -04:00
zhitkoff
e40e887022 split: some refactoring for handle_obsolete() 2023-09-06 18:43:20 -04:00
Daniel Hofstetter
5c93c592db uucore: turn version_cmp into a feature 2023-09-06 09:47:50 +02:00
zhitkoff
eaae32ec3b split: comments 2023-09-05 20:12:25 -04:00
David Matos
8be6338da9 cp: Error out if cp only contains source 2023-09-05 23:35:14 +02:00
Yury Zhytkou
e0b000a3bc
Merge branch 'main' into split-gnu-test-fail.sh 2023-09-05 17:22:31 -04:00
zhitkoff
2ae1d8d1cc split: missing functionality for --number option 2023-09-05 17:13:30 -04:00
Sylvestre Ledru
8b24e7ce0b
Merge pull request #5246 from cakebaker/yes_use_let_else
yes: use let/else to fix todo
2023-09-05 09:51:22 +02:00
Sylvestre Ledru
ce6be522af
Merge pull request #5245 from cakebaker/wc_ilog10
wc: use Rust's ilog10(), remove custom ilog10 fn
2023-09-05 09:51:13 +02:00
Daniel Hofstetter
e493b9c527 yes: use let/else to fix todo 2023-09-05 08:16:25 +02:00
Daniel Hofstetter
f30b59efc0 wc: use Rust's ilog10(), remove custom ilog10 fn 2023-09-05 07:37:14 +02:00
zhitkoff
636c2bb7ae uucore: parse_size_max and split 2023-09-04 12:05:26 -04:00
Daniel Hofstetter
4992cb9b86 Use std::io::IsTerminal instead of is-terminal 2023-09-04 10:35:17 +02:00
zhitkoff
420965a3ab prereq for fixing tests/split/fail.sh 2023-09-03 20:39:50 -04:00
Daniel Hofstetter
183d465f74 uucore: turn ranges into a feature 2023-09-03 16:20:15 +02:00
Daniel Hofstetter
f8845cde24
Merge pull request #5237 from sylvestre/version-21
0.0.20 => 0.0.21
2023-09-03 16:00:26 +02:00
Sylvestre Ledru
9844f1f07d 0.0.20 => 0.0.21 2023-09-03 14:42:54 +02:00
Terts Diepraam
cb8c0e79e2 cp: finish progress bar to make it always show up 2023-09-02 18:46:18 +02:00
Sylvestre Ledru
1f3f9d85f7
Merge pull request #5232 from cakebaker/uucore_update_control_feature
uucore: turn update_control into a feature
2023-09-02 16:22:21 +02:00
Daniel Hofstetter
be3aac924b mknod: remove unnecessary "not" in test 2023-09-02 16:02:14 +02:00
Daniel Hofstetter
b405d4e6cc uucore: turn update_control into a feature 2023-09-02 14:45:58 +02:00
Sylvestre Ledru
633ae06524
Merge pull request #5225 from tertsdiepraam/factor-short-circuit-write-error
`factor`: short circuit on write error, but not on parse error
2023-09-01 21:09:25 +02:00
Sylvestre Ledru
6012002880
Merge pull request #5231 from cakebaker/uucore_backup_control_feature
uucore: turn backup_control into a feature
2023-09-01 21:08:59 +02:00
Sylvestre Ledru
b783088900
Merge pull request #5229 from cakebaker/uucore_make_dunce_optional
uucore: make "dunce" optional
2023-09-01 16:54:42 +02:00
Daniel Hofstetter
b41ff2ed7f uucore: turn backup_control into a feature 2023-09-01 16:20:37 +02:00
Daniel Hofstetter
2e71508308 uucore: make "dunce" optional 2023-09-01 09:47:22 +02:00
XXIV
4f465eb76c
remove unnecessary heap allocation 2023-08-31 23:44:45 +03:00
zhitkoff
271a108fa9 split: formatting 2023-08-31 15:37:42 -04:00
zhitkoff
5bfe9b19ef split: avoid using collect_lossy + test for invalid UTF8 arguments 2023-08-31 14:46:56 -04:00
Daniel Hofstetter
fb1c663724 uucore: make deps of "sum" feature optional 2023-08-31 16:45:55 +02:00
zhitkoff
6f37b4b4cf split: hyphenated values + tests 2023-08-30 19:29:57 -04:00
Terts Diepraam
9a67393c44 factor: short circuit on write error, but not on parse error 2023-08-30 18:51:29 +02:00
zhitkoff
7f905a3b8d split: edge case for obs lines within combined shorts + test 2023-08-29 16:35:00 -04:00
Terts Diepraam
1ad10dd371 echo: add support for \NNN octal escape sequence 2023-08-29 21:54:19 +02:00
zhitkoff
15c7170d20 split: fix for GNU Tests regression + tests 2023-08-29 15:49:47 -04:00
zhitkoff
e79753c1cf split: refactor handle_obsolete() function 2023-08-29 13:58:26 -04:00
Terts Diepraam
93a54f36f3 hashsum: change debug to display format with --tag 2023-08-29 10:15:38 +02:00
zhitkoff
2f35989ac3 split: comments 2023-08-28 18:26:48 -04:00
zhitkoff
fa8d18b826 split: refactor obsolete lines 2023-08-28 18:24:21 -04:00
Terts Diepraam
4623575a66 echo: fix wrapping behavior of octal sequences 2023-08-28 23:21:39 +02:00
Yury Zhytkou
1eae064e5c
split: better handle numeric and hex suffixes, short and long, with and without values (#5198)
* split: better handle numeric and hex suffixes, short and long, with and without values
Fixes #5171

* refactoring with overrides_with_all() in args definitions

* fixed comments

* updated help on suffixes to match GNU

* comments

* refactor to remove value_parser()

* split: refactor suffix processing + updated tests

* split: minor formatting
2023-08-28 10:09:52 +02:00
Daniel Hofstetter
e4ea64af5c
Merge pull request #5211 from tertsdiepraam/nushell-expose-uucore-args
`cp`: re-export `uucore::{BackupMode, UpdateMode}`
2023-08-28 07:29:49 +02:00
Terts Diepraam
ab859f4efa cp: re-export uucore::{BackupMode, UpdateMode}
This allows other projects to construct values for these types
which in turn allows them to construct Options.

This is implemented at the request of nushell
2023-08-28 00:19:10 +02:00
zhitkoff
84d96f9d02 split: refactor for more common use case 2023-08-26 11:11:46 -04:00
Daniel Hofstetter
db342556c2 nl: implement -d/--section-delimiter 2023-08-26 16:15:26 +02:00
Daniel Hofstetter
2e2387d434 parse_size,dd: turn instance fns to associated fns 2023-08-26 14:35:35 +02:00
Sylvestre Ledru
f0602b0ce6
Merge pull request #5204 from cakebaker/fix_clippy_warnings
Fix clippy warnings with Rust 1.72.0
2023-08-25 13:21:38 -04:00
Sylvestre Ledru
e8ed65f4fa
Merge pull request #5206 from cakebaker/fix_bool_to_int_with_if
uucore,comm: fix warnings from bool_to_int_with_if
2023-08-25 13:20:00 -04:00
Sylvestre Ledru
055537e831
Merge pull request #5187 from Benjscho/jwalk-investigation
Add benchmarking for `rm`
2023-08-25 13:19:14 -04:00
Daniel Hofstetter
79a44d768c uucore,comm: fix warnings from bool_to_int_with_if 2023-08-25 15:29:15 +02:00
Daniel Hofstetter
b9c05ed4e3 Remove the author copyright notices
from files missed by https://github.com/uutils/coreutils/pull/5184
and https://github.com/uutils/coreutils/pull/5197
2023-08-25 15:03:19 +02:00
Daniel Hofstetter
01b2834f2e Fix clippy warnings with Rust 1.72.0 2023-08-25 13:22:02 +02:00
Ben Schofield
4d78ca47b1 Add Spell ignore
Add `samply` and `flamegraph` to spell ignore lists.
2023-08-24 11:15:03 -06:00
Terts Diepraam
c3f9e19a3b all: normalize license notice in all *.rs files 2023-08-24 12:21:09 +02:00
Ben Schofield
903490a9c8 spelling 2023-08-23 13:05:06 -07:00
Daniel Hofstetter
774180bb09 Remove the author copyright notices
from files missed by #5184
2023-08-23 10:54:00 +02:00
Ben Schofield
9ddf218ed9 Add samply url 2023-08-22 07:59:11 -07:00
Ben Schofield
181261beef Add samply to sampling options
Add samply to the sampling options for `rm` benchmarking.
2023-08-22 07:56:42 -07:00
Sylvestre Ledru
0b9c829bce
Merge pull request #5182 from sylvestre/clippy_
Fix some of the recent clippy warnings
2023-08-21 16:21:02 -04:00
Ben Schofield
76eea583b4 Add benchmarking for rm
Add benchmarking script and guide for `rm`, mostly copied from `ls` benchmarking
guide. Tested `rm` using `jwalk` instead of `walkdir`, and saw a slight performance
regression, if any change.
2023-08-21 12:10:31 -07:00
Sylvestre Ledru
bf5b765cba
Remove the author copyright notices (#5184)
* Remove the author copyright notices

Rational:
* not maintained
* does not reflect reality
* don't provide any value (the info can be found in the git log)
* we don't have rules to update them
  (ex: should you update it after one line, two lines, etc)

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2023-08-21 12:23:18 +02:00
Daniel Hofstetter
675db9186e id: remove mutable reference when calling id_print 2023-08-21 11:39:18 +02:00
Daniel Hofstetter
ba8e9366f6 stdbuf: fix get_preload_env doesn't need a mutable reference 2023-08-21 10:56:17 +02:00
Daniel Hofstetter
808f9e2fd6 uucore: add missing "!" 2023-08-21 10:56:17 +02:00
Sylvestre Ledru
bfca6bf70f Add license headers on all files 2023-08-21 10:49:27 +02:00
Sylvestre Ledru
7c9f4ba92a Fix some clippy warnings 2023-08-21 08:41:40 +02:00
tommady
b5746f794c
date: fix panic when input will cause overflow (#5160)
* fix issue 5149

* fix clippy style issue

* fix spell issue

* address comment

* address comments

* fix cspell
2023-08-20 16:55:38 +02:00
Simon Legner
872818607f
Extract uucore::line_ending::LineEnding (#5120)
* Extract uucore::line_ending::LineEnding

Aims to provide consistent newline/zero terminator handling.

* Apply suggestions from code review

Co-authored-by: Terts Diepraam <terts.diepraam@gmail.com>

* cargo fmt

* Use uucore::line_ending::LineEnding

* Remove uucore::line_ending::LineEnding::Space

* Rename LineEnding::from_zero_flag

* Replace LineEnding::None with Option<LineEnding>

* cargo clippy

* assert_eq

* cargo clippy

* cargo clippy

* uucore/line_ending: add more documentation

---------

Co-authored-by: Terts Diepraam <terts.diepraam@gmail.com>
2023-08-20 10:03:29 +02:00
Sylvestre Ledru
3b0bfb10ac
Merge pull request #5172 from tertsdiepraam/docs-platform-support-page
Docs platform support page
2023-08-19 19:21:48 +02:00
Terts Diepraam
171f9d660c docs: add platform support page in the docs 2023-08-19 18:19:12 +02:00
Daniel Hofstetter
d604f709ce nl: handle line number overflow 2023-08-19 07:16:06 +02:00
Terts Diepraam
9e3d93e7ea
Merge pull request #5152 from tertsdiepraam/cp-prepare-for-nu
`cp`: make more types public and add more documentation (for nushell)
2023-08-19 00:39:23 +02:00
Terts Diepraam
f1978955ba
Merge pull request #5156 from cakebaker/nl_implement_try_from_for_numbering_style
nl: implement TryFrom<&str> for NumberingStyle
2023-08-18 23:10:32 +02:00
Terts Diepraam
597f51670c cp: refactor attribute parsing
Clean up the parsing of the attributes to
preserve. There are several improvements here: Preserve now uses  `max`
from Ord, the `max` method is now called `union` and does not mutate,
the parse loop is extracted into a new function `parse_iter`, the `all`
and `none` methods are replaced with const values. Finally
all fields of Attributes are now public.
2023-08-16 19:04:18 +02:00
Bluelief
946e1bb2d1
fmt: fix panic on width argument 2023-08-14 22:47:21 +09:00
Daniel Hofstetter
d5ab7bbacd nl: implement TryFrom<&str> for NumberingStyle 2023-08-13 14:09:15 +02:00
Daniel Hofstetter
08e21e183b nl: re-add handling for -p/--no-renumber 2023-08-12 14:36:22 +02:00
Terts Diepraam
ffa08f4741 cp: make more types public and add more documentation 2023-08-11 19:56:40 +02:00
Terts Diepraam
a3b80e1bef
Merge branch 'main' into fmt_implement_default_for_fmtoptions 2023-08-11 12:38:42 +02:00
Terts Diepraam
0a4f833bb7
Merge pull request #5127 from cakebaker/uucore_fix_shortcut_value_parser
uucore: don't show error for ambiguous value
2023-08-11 11:16:30 +02:00
Terts Diepraam
8f5899b8d9
Merge pull request #5147 from cakebaker/rm_refactor_prompt_file
rm: refactor prompt_file()
2023-08-11 10:14:37 +02:00
Terts Diepraam
31eebea804
Merge pull request #5131 from cakebaker/nl_refactoring
nl: fix output of numbering styles
2023-08-10 23:52:30 +02:00
Terts Diepraam
268292f9f8
Merge pull request #5143 from cakebaker/mv_remove_unnecessary_or
mv: remove unnecessary OR in condition
2023-08-10 23:33:40 +02:00
Terts Diepraam
407bccc54f some more work on printf spec 2023-08-10 23:20:20 +02:00
Daniel Hofstetter
113972aa44 rm: replace "if" with "match" in prompt_file() 2023-08-10 15:58:08 +02:00
Daniel Hofstetter
bdd25c37cf rm: split prompt_file() into two functions 2023-08-10 15:58:01 +02:00
Rayhan Faizel
e3ea6144cb stat: Output error when - and -f are used together. 2023-08-10 08:33:53 +05:30
Daniel Hofstetter
09360e6796 mv: remove unnecessary OR in condition 2023-08-09 16:15:30 +02:00
Daniel Hofstetter
6b1c4d1fa9 seq: remove unused param from write_value_float() 2023-08-07 15:22:06 +02:00
John Shin
0aa29682d0 seq: display -0 2023-08-07 00:09:46 -07:00
John Shin
2bb56d44a4 seq: add tests for infinity and -infinity args 2023-08-05 19:40:45 -07:00
Daniel Hofstetter
271606ddfa nl: fix output of numbering styles 2023-08-03 16:53:56 +02:00
Aneesh
773e69078c docs(bin,has): add docstrings for macros bin and has 2023-08-03 13:39:38 +05:30
Terts Diepraam
66eb64e41f dd, printf, seq: update to new printf 2023-08-02 23:57:53 +02:00
Terts Diepraam
a3e68d5bbd uucore: start work on a completely new printf implementation 2023-08-02 23:57:26 +02:00
Daniel Hofstetter
ec27a074c0 uucore: don't show error for ambiguous value
that's a direct match in ShortcutValueParser
2023-08-01 08:39:05 +02:00
John Shin
d345a280bf seq: update inf and nan parsing 2023-07-30 14:43:58 -07:00
Daniel Hofstetter
a9dde668ca
Merge pull request #5115 from resistor/rotate
Use `rotate_right` rather than an explicit expansion in `sum`
2023-07-29 16:42:45 +02:00
Daniel Hofstetter
5c65f44957
Merge pull request #5116 from simon04/patch-1
tsort: use Iterator.all
2023-07-29 07:50:38 +02:00
John Shin
426cce7df0 rmdir: use is_empty() 2023-07-28 17:10:36 -07:00
John Shin
0d56792c58 mv: use is_empty() 2023-07-28 17:09:23 -07:00
Simon Legner
24319791ec
tsort: use Iterator.all 2023-07-28 21:25:11 +02:00
Owen Anderson
e9f89c46e0 Use rotate_right instead of explicit expansion. 2023-07-27 23:43:16 -06:00
Terts Diepraam
c2997718cd touch: move from time to chrono
This allows us to work with daylight savings time which is necessary to enable one of the tests. The leap second calculation and parsing are also ported over. A bump in the chrono version is necessary to use NaiveTime::MIN.
2023-07-27 17:06:38 +02:00
Sylvestre Ledru
4004281f34
Merge pull request #5100 from cakebaker/nl_shorten_enum_variants
nl: shorten variants of NumberingStyle enum
2023-07-25 20:18:55 +02:00
Sylvestre Ledru
9449eda51d
Merge pull request #5103 from cakebaker/nl_join_blank_lines_show_error_if_zero
nl: show error if --join-blank-lines is zero
2023-07-25 20:18:43 +02:00
Daniel Hofstetter
fe9ec37141 uucore: use "workspace=true" for some dependencies 2023-07-22 16:14:32 +02:00
Sylvestre Ledru
e77a1bf54c
Merge pull request #4342 from tmccombs/mktemp-req-equals
Require = for --tmpdir in mktemp
2023-07-21 14:36:25 +02:00
Daniel Hofstetter
d40a25db5d csplit: remove explicit "into_iter()" 2023-07-21 10:52:03 +02:00
Daniel Hofstetter
aef130dae7 nl: show error if --join-blank-lines is zero 2023-07-20 15:26:46 +02:00
Daniel Hofstetter
013e94522e nl: shorten variants of NumberingStyle enum 2023-07-20 09:45:21 +02:00
Daniel Hofstetter
d7d2ad52db nl: fix zero padding of negative line numbers 2023-07-19 16:22:53 +02:00
Sylvestre Ledru
e15e03a2bf
Merge pull request #5091 from cakebaker/nl_fix_output_of_line_numbers
nl: fix calculation of line number lengths
2023-07-19 15:39:35 +02:00
Sylvestre Ledru
0126f20926
Merge pull request #5089 from cakebaker/cat_remove_long_version_of_t_arg
cat: remove --t
2023-07-18 19:35:06 +02:00
Daniel Hofstetter
cf29f3f452
Merge pull request #5093 from sylvestre/fix-man-coreutils
Improve the coreutils manpage
2023-07-18 15:13:39 +02:00
Thayne McCombs
6262a3e9d9 Add tests for mktemp tmpdir flags
And set overrides_with for tmpdir flags.

Tests were copied from #4275

Co-authored-by: David Matos <davidmatos06@gmail.com>
2023-07-18 12:46:05 +02:00
Thayne McCombs
b77a08c134 Require = for --tmpdir in mktemp
Fixes #3454

This implementation more closely matches the behavior of GNU mktemp. Specifically,
if using the short-form `-p`, then DIR is required, and if using the long form `--tmpdir`
then DIR is optional, but if provided, must use the `--tmpdir=DIR` form (not `--tempdir DIR`),
so that there is no ambiguity with also passing a TEMPLATE.

The downside to this implementation is we are now introducing a new workaround for
https://github.com/clap-rs/clap/issues/4702 where we use separate calls to `.arg()` for
the short `-p` and the long `--tmpdir`, which results in a less than ideal output for `--help`.
2023-07-18 12:46:05 +02:00
Daniel Hofstetter
27ee279913 nl: fix calculation of line number lengths 2023-07-18 09:30:23 +02:00
Sylvestre Ledru
83c8517142 coreutils multicall: the manpage subcommand doesn't display the right command
see https://manpages.debian.org/unstable/rust-coreutils/rust-coreutils.1.en.html
2023-07-17 22:46:34 +02:00
Tuomas Tynkkynen
96dbd6d386 stty: Implement printing assignment of control chars
Part of #3861.

Code comments from sylvestre.

Co-authored-by: Sylvestre Ledru <sledru@mozilla.com>
2023-07-16 17:49:23 +03:00
Daniel Hofstetter
373035fa08 cat: remove --t 2023-07-16 16:48:01 +02:00
Sylvestre Ledru
78fed70982
Merge pull request #5078 from cakebaker/nl_allow_negative_values_for_i_and_v
nl: allow negative values for --line-increment and --starting-line-number
2023-07-15 00:21:51 +02:00
Sylvestre Ledru
6f67c90032
Merge pull request #5081 from cakebaker/ci_add_default_trait_access_lint
ci: add default_trait_access lint and fix its warnings
2023-07-15 00:20:53 +02:00
Daniel Hofstetter
424d51285c clippy: fix default_trait_access lint warnings 2023-07-14 13:41:06 +02:00
Sylvestre Ledru
74530c0f51 Update the version to 0.0.20 2023-07-14 13:04:17 +02:00
Daniel Hofstetter
388f249716 nl: allow negative values for -i and -v 2023-07-14 12:31:17 +02:00
Daniel Hofstetter
5d03d2d9d4 clippy: fix warnings introduced by Rust 1.71.0 2023-07-13 17:35:33 +02:00
Sylvestre Ledru
1897c18e88
Merge pull request #5073 from cakebaker/nl_add_test_for_number_separator
nl: add test for "--number-separator"
2023-07-12 22:42:01 +02:00
Rayhan Faizel
504b9e15a0 Clamp overflowing values in --width to maximum 2023-07-12 23:23:58 +05:30
Daniel Hofstetter
20b1f11daa nl: add test for "--number-separator"
and replace "match" with "if let"
2023-07-12 15:25:02 +02:00
Daniel Hofstetter
826adc62aa nl: show error if --number-width is zero
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2023-07-11 17:45:53 +02:00
Sylvestre Ledru
8e8b825b45
Merge pull request #5063 from cakebaker/nl_use_value_parser_for_number_format
nl: use value parser for "--number-format"
2023-07-11 17:10:20 +02:00
Daniel Hofstetter
eb2123ee15 nl: add "after help" 2023-07-11 14:26:54 +02:00
Daniel Hofstetter
cb50208909 nl: use value parser for "--number-format" 2023-07-10 11:20:37 +02:00
John Shin
e5331e3abb
Merge branch 'main' into ls-version-cmp 2023-07-09 14:36:46 -07:00
Daniel Hofstetter
f67ef7fb11 nl: change value name to match help text 2023-07-09 16:08:38 +02:00
Daniel Hofstetter
f8a955266e
Merge pull request #4750 from NikolaiSch/seq-panic-fix
fix: seq panic on no arguments #4749
2023-07-09 14:19:07 +02:00
Daniel Hofstetter
0b37b63ea3
Merge pull request #5055 from yt2b/ls_literal_option
ls: --l should output the same as --literal
2023-07-09 14:07:24 +02:00
Sylvestre Ledru
10bca71b09
Merge branch 'main' into ls-version-cmp 2023-07-09 09:24:39 +02:00
Sylvestre Ledru
78fd0efab9
Merge pull request #5013 from shinhs0506/core-version-cmp
uucore: leading zeros are ignored in version compare
2023-07-09 09:21:18 +02:00
Daniel Hofstetter
6f91371e61 touch: accept "modify" & "mtime" for --time arg 2023-07-08 16:13:35 +02:00
Terts Diepraam
24c2743e10
Merge pull request #5053 from dezgeg/stty-baudrate
stty: Support setting baud rate
2023-07-08 13:27:56 +02:00
Tuomas Tynkkynen
bde9030e4e stty: Support setting baud rate
Part of #3859.
2023-07-08 11:46:16 +03:00
yt2b
cf6f7856e4 ls: fix --l option 2023-07-08 10:43:20 +09:00
Tuomas Tynkkynen
85b9b61dd8 stty: Finish '--save' support
Argument parsing for this exists, but the option doesn't change output
in any way. Finish the support.

Closes #3862
2023-07-08 02:24:26 +03:00
Daniel Hofstetter
ac4ff2ac0e seq: simplify error handling
Co-authored-by: Terts Diepraam <terts.diepraam@gmail.com>
2023-07-06 10:26:29 +02:00
John Shin
844cbdc5a4 sort: add tests for stable and unstable sort 2023-07-05 10:05:52 +02:00
John Shin
e9405250f4 uucore: leading zeros are ignored in version compare 2023-07-05 10:05:52 +02:00
Daniel Hofstetter
4a192e98d5
Merge pull request #5032 from sylvestre/split-fail
split: reject some invalid values
2023-07-05 07:04:22 +02:00
John Shin
4acd02c7a1 ls: string compare if version_cmp returns equal 2023-07-04 16:08:54 -07:00
Sylvestre Ledru
9d44d8b71d
Merge pull request #4977 from cakebaker/date_shortcut_value_parser
date: use custom value parser
2023-07-04 19:56:46 +02:00
Sylvestre Ledru
264d29a169
fix the clippy warning 2023-07-04 18:45:11 +02:00
Terts Diepraam
c455aa0922
Merge pull request #5036 from cakebaker/nl_fix_no_renumber
nl: make -p/--no-renumber a flag
2023-07-04 14:16:04 +02:00
Daniel Hofstetter
fee5225cb6 nl: make --no-renumber a flag 2023-07-04 10:37:10 +02:00
Daniel Hofstetter
18e5c5b5f7 numfmt: remove duplicate info from help output 2023-07-04 07:02:18 +02:00
Sylvestre Ledru
d033db3573 split: reject some invalid values
Matches what is done in tests/split/fail.sh
(still doesn't work)
2023-07-03 22:57:37 +02:00
Sylvestre Ledru
37cbfd1efd
Merge pull request #5030 from cakebaker/touch_use_parse_datetime
touch: use parse_datetime instead of humantime_to_duration
2023-07-03 16:26:51 +02:00
Daniel Hofstetter
11b098fce1
Merge pull request #5028 from sylvestre/cp-multiple
cp: allow multiple usages of -R - Closes: #5027
2023-07-03 16:09:45 +02:00
Sylvestre Ledru
e491bbdbed cp: allow multiple usages of -R/-r Closes: #5027
works for all other rm args
2023-07-03 14:19:45 +02:00
Roy Ivy III
af64bde92b fix/touch ~ time crate usage errors 2023-07-03 14:15:15 +02:00
Sylvestre Ledru
7a7842b5b8
Merge pull request #4756 from Joining7943/tail-refactor-and-fix-input
`tail`: Refactor `paths::Input::from` and `Settings::inputs`
2023-07-03 14:09:57 +02:00
Roy Ivy III
9aef5ac35b deps ~ change from 'humantime_to_duration' to 'parse_datetime' 2023-07-03 13:53:52 +02:00
Terts Diepraam
5a667db43d tail: clean up some small things in input parsing 2023-07-03 13:20:48 +02:00
sbentmar
42bf580f13
numfmt: add --invalid option (#4249)
* numfmt: add invalid option

* numfmt: return code 0 if ignore or warn

* numfmt: implement all --invalid modes

* numfmt: validate stdout and stderr

* numfmt: remove unnecessary code

* numfmt: apply formatting

* numfmt: fix clippy issues

* numfmt: fix failing test cases

* numfmt: fix formatting

* numfmt: fix bug when handling broken pipe

* numfmt: fix bug where extra newline was added

* numfmt: add test cases for edge cases

* numfmt: simplify error handling

* numfmt: remove redundant if

* numfmt: add newline between functions

* numfmt: fix failing test cases

* numfmt: add support for arg numbers using --invalid

* numfmt: simplify error handling in value handlers

* numfmt: fix merge conflict and align prints

* numfmt: fix clippy suggestion

* numfmt: replace "valid" with "invalid" in tests

* numfmt: move INVALID to respect alph. order

* numfmt: move printlns outside of match to avoid duplication

Co-authored-by: Sylvestre Ledru <sledru@mozilla.com>

* numfmt: remove empty line

---------

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
Co-authored-by: Sylvestre Ledru <sledru@mozilla.com>
2023-07-01 17:08:12 +02:00
Daniel Hofstetter
a145798594
Merge pull request #4960 from granquet/ls_LZ
ls: force fetching metadata when called with -L -Z
2023-07-01 15:24:37 +02:00
Daniel Hofstetter
c524ec4a9f
Merge pull request #4950 from Ideflop/more_implement_arguments_plain_and_from_line
More implement arguments plain and from line
2023-07-01 14:18:54 +02:00
crapStone
863f91eca9
fix typos
some arguments had the wrong case
2023-06-29 15:34:19 +00:00
Daniel Hofstetter
610e0461e9
Merge pull request #5020 from indygreg/hashsum-file-stem
hashsum: use file_stem() instead of file_name()
2023-06-29 13:50:30 +02:00
Daniel Hofstetter
5b18c53c9d
Merge pull request #4999 from sylvestre/mv-backup-src
mv: add the check with --b=simple and when the source is a backup
2023-06-29 13:19:40 +02:00
Gregory Szorc
a7f95d5a23 hashsum: use file_stem() instead of file_name()
This program matches the binary name to determine which
algorithm to use. On Windows, `file_name()` was matching
against a string with `.exe`, causing binaries like
`sha256sum.exe` to not properly detect the algorithm.

By using `file_stem()`, we exclude the `.exe` from matching,
achieving similar and correct behavior on Windows.
2023-06-29 10:50:10 +02:00
Daniel Hofstetter
3357aa87a1
Merge pull request #5018 from sylvestre/memmap2
Move memmap2 in the root workpace
2023-06-29 09:31:04 +02:00
Sylvestre Ledru
14e5f89a0e Move memmap2 in the root workpace 2023-06-28 23:16:16 +02:00
Sylvestre Ledru
40c598852b mv: add the check with --b=simple and when the source is a backup 2023-06-28 23:11:28 +02:00
Sylvestre Ledru
24aff229da Add a function to detect if file is likely to be the simple backup file 2023-06-28 23:11:25 +02:00
John Shin
d2e7ba2da1 sort: add tests for stable and unstable sort 2023-06-27 12:15:58 -07:00
John Shin
0ff00ec44c uucore: leading zeros are ignored in version compare 2023-06-26 16:28:31 -07:00
Ideflop
77f8201fb8 more: fix bug not displaying next file message and not stopping at end of file 2023-06-26 21:57:52 +02:00
Ideflop
479340306e more: implement arguments -u/--plain and -F/--from-line 2023-06-26 21:57:45 +02:00
Daniel Hofstetter
c05dbfa3b4 seq: rename "--widths" to "--equal-width"
for compatibility with GNU seq
2023-06-26 16:21:59 +02:00
Terts Diepraam
873c6c36f7
Merge branch 'main' into ls_LZ 2023-06-26 15:52:52 +02:00
Daniel Hofstetter
9149409065
Merge pull request #4991 from shinhs0506/du_apparent
du: directories have apparent size of 0
2023-06-26 14:58:40 +02:00
Guillaume Ranquet
80c7ed9732 ls: force fetching metadata when called with -L -Z
The metadata are not used but it permits to check the symlink is valid.
We then return 1 on invalid symlinks when ls is invoked with ls -L -Z

Signed-off-by: Guillaume Ranquet <granquet@baylibre.com>
2023-06-26 14:46:56 +02:00
Daniel Hofstetter
6a7b5379ea
Merge pull request #5008 from uutils/renovate/libc-0.x
fix(deps): update rust crate libc to 0.2.147
2023-06-26 07:56:10 +02:00
John Shin
b34e7f7bf6 du: directories have apparent size of 0 2023-06-25 15:56:57 -07:00
Sylvestre Ledru
644fd1c93e fix some clippy warnings 2023-06-25 22:29:08 +02:00
Nikolai
0b06f2b4a8 fixing seq panic on none 2023-06-25 22:23:40 +02:00
Sylvestre Ledru
b03a88e154
Merge pull request #4972 from cakebaker/sort_migrate_from_ouroboros_to_self_cell
sort: migrate from ouroboros to self_cell
2023-06-25 21:15:02 +02:00
renovate[bot]
824097d224
fix(deps): update rust crate libc to 0.2.147 2023-06-25 19:09:01 +00:00
Sylvestre Ledru
ddcdda44db Remove the auto capitalization of error message 2023-06-25 00:18:33 +02:00
Sylvestre Ledru
da8cb64b74
Merge pull request #4989 from cakebaker/touch_rename_const
touch: rename CURRENT to TIMESTAMP
2023-06-24 10:24:21 +02:00
Sylvestre Ledru
ed71bb60e0
Merge pull request #4995 from cakebaker/nl_implement_default_for_settings
nl: implement Default for Settings
2023-06-24 10:24:08 +02:00
Daniel Hofstetter
d57a5eb6a3 seq: remove two chars in seq.md 2023-06-24 07:07:38 +02:00
renovate[bot]
0144a3c78f
fix(deps): update rust crate itertools to 0.11.0 2023-06-22 13:43:21 +00:00
Daniel Hofstetter
0010fece35 nl: remove "spell-checker:ignore" line 2023-06-22 14:35:04 +02:00
Daniel Hofstetter
d00134640b nl: use "const" instead of "static" 2023-06-22 14:33:32 +02:00
Daniel Hofstetter
c32139784a nl: implement Default for Settings 2023-06-22 14:30:53 +02:00
Daniel Hofstetter
98d242de7e nl: fix typo in nl.md 2023-06-22 10:04:37 +02:00
Sylvestre Ledru
8debc96eeb
Merge pull request #4983 from TheDcoder/parse-hex
od: fix parsing of hex input ending with `E`
2023-06-20 22:55:32 +02:00
yt2b
c3f2ac6f04 yes: add --version option 2023-06-20 23:20:22 +09:00
Daniel Hofstetter
98ef87af86 touch: cleanup "spell-checker:ignore" line 2023-06-20 15:28:32 +02:00
Daniel Hofstetter
e990f87edc touch: rename CURRENT to TIMESTAMP 2023-06-20 15:23:54 +02:00
Daniel Hofstetter
6ebfaf4b9d sort: migrate from ouroboros to self_cell 2023-06-19 10:17:39 +02:00
Sylvestre Ledru
66723e0961
Merge pull request #4447 from Freaky/dd-alarm-timer
dd: use an alarm thread instead of elapsed() calls
2023-06-19 09:27:13 +02:00
Damon Harris
b7154a80e1 od: fix parsing of hex input ending with E 2023-06-18 21:02:39 +05:30
Kostiantyn Hryshchuk
7306be6e58 fixed shred -u for windows
fixed shred panic on windows
2023-06-18 17:12:10 +02:00
John Shin
47d0ac4a42 sync: fix error msg 2023-06-17 19:50:47 -07:00
Daniel Hofstetter
643afbd731 date: use ShortcutValueParser 2023-06-14 13:34:50 +02:00
Daniel Hofstetter
24b979c821 uucore: introduce ShortcutValueParser 2023-06-14 13:34:50 +02:00
Rayhan Faizel
fa11315ce7 mv: check strictly for hard links first before checking for symlinks to catch a very special case, plus ensure only nobackupmode is considered 2023-06-12 23:48:49 +05:30
Rayhan Faizel
c113284a4b uucore: modify are_hardlinks_to_same_file to check only immediate metadata 2023-06-12 23:46:33 +05:30
Sylvestre Ledru
e7557c2bae
Merge branch 'main' into dd-alarm-timer 2023-06-11 18:27:41 +02:00
Sylvestre Ledru
856825bbbc
Merge pull request #4966 from Skryptonyte/mv_selfinto2fix
mv: fix into-self-2.sh test
2023-06-11 18:26:25 +02:00
Daniel Hofstetter
67114ac63c date: switch to parse_datetime 2023-06-11 14:36:51 +02:00
Rayhan Faizel
28ad5cab9f mv: fix GNU test tests/mv/into-self-2.sh 2023-06-10 18:32:09 +05:30
Rayhan Faizel
ab42b1e599 uucore: add function which checks hardlink as well as directed symlink 2023-06-10 18:31:30 +05:30
Sylvestre Ledru
63b84fed8b
Merge pull request #4927 from cakebaker/bump_fundu_and_fix_compile_errors
Bump fundu to 1.0.0 and fix compile errors
2023-06-10 09:23:21 +02:00
Frantisek Kropac
ad96a1b8a0
Find MountInfo properly when symlink is used (#4929)
* Find MountInfo properly when symlink is entered

According to GNU implementation the entered path is
being compared with the canonicalized device name
in MountInfo.

Co-authored-by: Frantisek Kropac <kropac.ff@gmail.com>
Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2023-06-10 09:22:01 +02:00
renovate[bot]
d26c596a4c
fix(deps): update rust crate memmap2 to 0.7 2023-06-08 11:02:36 +00:00
Sylvestre Ledru
6ecef3a0e3 Reformat TOML files with taplo
npx --yes @taplo/cli fmt
2023-06-08 09:07:19 +02:00
Sylvestre Ledru
6d6966cfb1
Merge pull request #4952 from wanderinglethe/date-remove-time-dep
Remove time dependency from date
2023-06-06 22:21:38 +02:00
Daniel Hofstetter
0128198a99
Merge pull request #4954 from Skryptonyte/ls_sortwidth
ls: Implement new sort option --sort=width
2023-06-06 18:46:54 +02:00
Rayhan Faizel
3f33c5b816 ls: Implement --sort=width 2023-06-06 20:55:42 +05:30
renovate[bot]
c68b665bf9
fix(deps): update rust crate libc to 0.2.146 2023-06-06 14:39:50 +00:00
Wandering Lethe
42a22c12f1
Remove time dependency from date
Also upgrades humantime_to_duration to the latest version, it switched from time to chrono. Because touch still depends on time, its humantime_to_duration package version deviates from the workspace version.
2023-06-05 21:41:32 +02:00
Detlev Casanova
b070506255 tsort: Switch to BTreeHash and BTreeSet
Using HashMap and HashSet give a valid topological sort, but the output
will change randomly at each run.

BTree based structures will guarantee that the output is always ordered
in the same way.

This also makes the ouptut similar to the output of the C version of the
tools, on which some applications rely.
2023-06-05 11:06:53 -04:00
Miles Liu
1c4d7b2f87
install: remove time crate 2023-06-05 16:34:50 +08:00
Sylvestre Ledru
3d220513e3
Merge pull request #4942 from x-dune/pr-use-chrono
`pr` use chrono instead of time
2023-06-04 18:46:38 +02:00
Sylvestre Ledru
abfceda12d
Merge pull request #4926 from sylvestre/new-release
New release
2023-06-04 16:09:04 +02:00
Tracy
126bbba17a
pwd: Fixes #4855 (#4937)
Based on testing with GNU's pwd, it seems like the -P flag should
take precedence over the use of the POSIXLY_CORRECT flag.

Co-authored-by: Terts Diepraam <terts.diepraam@gmail.com>
2023-06-04 16:03:01 +02:00
x-dune
7958c5d061 pr: use chrono instead of time 2023-06-04 20:17:52 +08:00
Sylvestre Ledru
9f38142522 add uuhelp to the ignore spell 2023-06-04 11:27:50 +02:00
Sylvestre Ledru
204d9b64f9 uuhelp_parser: update of the version 2023-06-04 09:46:59 +02:00
Sylvestre Ledru
e3cb5a111d Rename help_parser => uuhelp_parser 2023-06-04 09:46:59 +02:00
Sylvestre Ledru
a13d7f4060 uuhelp_parser: add the desc 2023-06-04 09:46:59 +02:00
Sylvestre Ledru
830b7d5ce1 New release 2023-06-04 09:46:59 +02:00
Guillaume Ranquet
ee4691f4a2 cp: makes --preserve requires =
prevents --preserve to eat the next argument when no value is passed.

default value for --preserve is set to mode,ownership(unix only),timestamps

before the patch:
cp --preserve foo bar
error: invalid value 'foo' for '--preserve [<ATTR_LIST>...]'
  [possible values: mode, ownership, timestamps, context, link, links, xattr, all]

Signed-off-by: Guillaume Ranquet <granquet@baylibre.com>
2023-06-04 09:46:35 +02:00
Sylvestre Ledru
160952a42c
Merge pull request #4918 from shinhs0506/core-size
shred: add support for octal and hex size
2023-06-03 10:48:19 +02:00
Sylvestre Ledru
e8effd0d0a
Merge pull request #4914 from Ideflop/more_implement_arguments_lines_and_number
more: implement arguments -n/--lines and --number
2023-06-02 20:20:20 +02:00
Sylvestre Ledru
20ce7accf2 cp: -i prompts in the right place
Should fix tests/cp/cp-i.sh
2023-06-01 21:42:35 +02:00
Sylvestre Ledru
4eb1e847e9 cp --no-clobber should fail 2023-06-01 21:42:32 +02:00
Daniel Hofstetter
b6c02c1a23 tail: fix compile error due to fundu update 2023-06-01 15:30:43 +02:00
Daniel Hofstetter
ccee02f025 sleep: fix compile error due to fundu update 2023-06-01 10:57:54 +02:00
Terts Diepraam
77e183955b head: use OsStringExt::from_vec instead of std::from_utf8_unchecked
This no longer triggers the `invalid_from_utf8_unchecked` lint. It
is also a bit cleaner and no longer requires `unsafe` because
OsString is not guaranteed to be valid UTF-8.
2023-05-31 21:18:13 +02:00
Terts Diepraam
701f30a15e
Merge pull request #4909 from sylvestre/test_debug
Add support for `cp --debug`
2023-05-31 20:27:02 +02:00
Daniel Hofstetter
09db8d8af9 fmt: adapt defaults to the ones used by GNU fmt 2023-05-31 16:41:56 +02:00
Daniel Hofstetter
42d6604e59 fmt: implement default for FmtOptions 2023-05-31 10:35:54 +02:00
Daniel Hofstetter
8940018833
Merge pull request #4897 from sylvestre/platform-info
update to platform-info 2.0.1
2023-05-31 09:29:57 +02:00
John Shin
4b09b917cd shred: use exact if size is given 2023-05-30 15:08:22 -07:00
John Shin
f10059db02 shred: refactor get_size 2023-05-30 13:40:41 -07:00
John Shin
b93bae2964 tail: fix parsing logic and add quote 2023-05-30 13:34:00 -07:00
John Shin
f10faf21bc head: interpret size as decimal 2023-05-30 13:32:48 -07:00
Sylvestre Ledru
f830b6e68f update to platform-info 2.0.1 2023-05-30 17:43:54 +02:00
Sylvestre Ledru
58bf998919
Ignore some words 2023-05-30 15:49:53 +02:00
John Shin
a397920183 core: refactor parse_number in size parser 2023-05-30 13:56:01 +02:00
John Shin
0465553f6e core: size parser treat 000 as decimal 2023-05-30 13:56:01 +02:00
John Shin
8ef926c6e8 core: refactor num and unit split 2023-05-30 13:56:01 +02:00
John Shin
6cadffc8f1 core: fix clippy warning for size parser 2023-05-30 13:56:01 +02:00
John Shin
3ca003846d shred: add support for hex and octal size 2023-05-30 13:56:01 +02:00
John Shin
6278c6f2d6 core: add octal and hex size parse support 2023-05-30 13:56:01 +02:00
Daniel Hofstetter
1781a5db1d
Merge pull request #4698 from uutils/renovate/windows-sys-0.x
fix(deps): update rust crate windows-sys to 0.48.0
2023-05-30 13:40:49 +02:00
Ideflop
f1c943ed31 more: error handling for write_all in function paging_add_back_message 2023-05-30 09:03:00 +02:00
renovate[bot]
2ec70dc05d
fix(deps): update rust crate dns-lookup to v2 2023-05-30 06:37:02 +00:00
renovate[bot]
8f9a328c6a
fix(deps): update rust crate windows-sys to 0.48.0 2023-05-30 06:36:57 +00:00
Daniel Hofstetter
191f2380b9
Merge pull request #4905 from sylvestre/mv-n
mv: Show 'skipped' when a file isn't overwriten
2023-05-30 07:27:48 +02:00
Sylvestre Ledru
f2006a9a6b cp: add support of cp --debug 2023-05-29 22:44:57 +02:00
Sylvestre Ledru
d38797bb50 mv: Show 'skipped' when a file isn't overwriten
Should fix tests/mv/mv-n.sh
2023-05-29 21:57:42 +02:00
Sylvestre Ledru
d303af31b7 cp: Accept --preserve=link
Used for example in:
tests/mv/hard-3.sh
2023-05-29 15:46:18 +02:00
Ideflop
6c98b23e80 more: implement arguments -n/--lines and --number 2023-05-29 14:36:18 +02:00
Jed Denlea
d6562b2b5f uniq: non-UTF-8 file names and fewer copies
uniq ought to be able to work with files whose names are not UTF-8.

I've also taken the chance to remove some unnecessary String
allocations.

Additionally, both open_input_file and open_output_file were returning
items with two implie levels of `Box<dyn ...>` that were not necessary.

In the case of stdin as input, it was not necessary to wrap stdin with a
BufReader, StdinLock implements BufRead itself.
2023-05-28 17:25:39 -07:00
Kamil Ogórek
07434647ad
fix: Correctly detect format when using md5sum with check flag (#4645) 2023-05-27 23:56:15 +02:00
Sylvestre Ledru
388fa1b717
Merge pull request #4696 from jeddenlea/wc
wc: streaming --files0-from and other improvements
2023-05-27 23:55:16 +02:00
Sylvestre Ledru
e295cb7acb
Merge pull request #4903 from Ideflop/more_implement_squeeze
more: implement argument -s / --squeeze
2023-05-27 20:38:52 +02:00
jaggededgedjustice
81a854a13e
date: Catch format string that is not supported by chrono (#4244)
* Catch format string that is not supported by chrono

Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2023-05-27 15:41:12 +02:00
Ideflop
03dec5128c more: implement argument -s / --squeeze 2023-05-27 00:04:04 +02:00
Daniel Hofstetter
81e3b04b11
Merge pull request #4888 from Ludmuterol/more-panic-4886
fix(#4886) more: panics if file is not readable
2023-05-24 17:42:27 +02:00
tpeters
eed916a076 more: disable raw mode on error 2023-05-24 13:40:14 +02:00
Moïse Valvassori
b29f8b011b
chown: show "ownership of 'foo' retained" message
* Display a message when the owner is not changed.

* Display a message when the current user/group doesn't match those specified in the `--from` args.

* print messages to stdout

* Show the message "ownership of 'foo' retained as 'bar'" for every path entry when `chown -v -R --from=`

* fix chown tests: test stdout and not stderr

* factorize duplicate code in a function

* Display a message when the owner is not changed.

* Display a message when the current user/group doesn't match those specified in the `--from` args.

* print messages to stdout

* Show the message "ownership of 'foo' retained as 'bar'" for every path entry when `chown -v -R --from=`

* fix chown tests: test stdout and not stderr

* factorize duplicate code in a function

* display the retained ownership details according to the destination ownership.
2023-05-24 09:45:19 +02:00
Sylvestre Ledru
9a6d47759b
Merge pull request #4890 from shinhs0506/rm-i
fix rm/interactive-always.sh
2023-05-23 18:59:37 +02:00
tpeters
50bff30c67 more: add test and change error type 2023-05-23 18:03:25 +02:00
John Shin
e50b84035f rm: fix prompt when --interactive is once 2023-05-22 21:26:52 -07:00
John Shin
78909fdd39 rm: allow empty when for --interactive arg 2023-05-22 21:11:47 -07:00
tpeters
d41777c52c more: change file unwrap to match 2023-05-22 20:07:14 +02:00
renovate[bot]
cda52ebce6
fix(deps): update rust crate data-encoding-macro to 0.1.13 2023-05-22 12:36:42 +00:00
renovate[bot]
66224cdbf8
fix(deps): update rust crate data-encoding to 2.4 2023-05-22 11:32:58 +00:00
Jed Denlea
e5b46ea3eb wc: more tests and fixes
My previous commits meant to bring our wc's output and behavior in line
with GNU's. There should be tests that check for these changes!

I found a stupid bug in my own changes, I was not adding 1 to the
indexes produced by .enumerate() when printing errors.
2023-05-22 01:02:35 -07:00
Sylvestre Ledru
e5419ade96
Merge pull request #4878 from cakebaker/mktemp_4874
mktemp: prioritize TMPDIR over -p when using -t
2023-05-22 09:31:11 +02:00
Jed Denlea
c4b53a44b5 wc: make --files0-from work with streams 2023-05-21 23:59:32 -07:00
Sylvestre Ledru
c91520768e
Merge pull request #4876 from shinhs0506/mkdir-p
mkdir: set correct permissions on dirs created by -p
2023-05-22 07:43:52 +02:00
Moïse Valvassori
0130a07579
chown: show message if file doesn't exist
* print the message "failed to change ownership of" when we try to change a non existing file.

* replace the 4-tuple returned by parse_gid_uid_and_filter by GidUidOwnerFilter struct.

* chain the test in one expression.

* chown: remove unused var "result" in test

---------

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2023-05-21 17:54:32 +02:00
Jed Denlea
d58ee5a28a wc: skip String to measure number length
Sadly ilog10 isn't available until we use 1.67, but we can get close in
the meantime.
2023-05-20 23:29:48 -07:00
Jed Denlea
36b45e2249 wc: touch up errors, quote more like GNU
WcError should not hold Strings which are clones of `&'static str`s.
thiserror provides a convenient API to declare errors with their Display
messages.

wc quotes the --files0-from source slightly differently when reporting
errors about empty file names.
2023-05-20 23:29:48 -07:00
Jed Denlea
38b4825e7f wc: avoid excess String allocations
print_stats will now take advantage of the buffer built into
io::stdout().

We can also waste fewer lines on show! by making a helper macro.
2023-05-20 23:08:26 -07:00
Jed Denlea
c3b06e10a6 wc: clean up of settings
The Settings object did not need a QuotingStyle member, it was basically
a static.
2023-05-20 22:30:14 -07:00
Daniel Hofstetter
70765eea82
Merge pull request #4872 from Ideflop/more_implement_print_over_and_clean_print
more: add arguments print over and clean print
2023-05-20 15:32:50 +02:00
Ideflop
2d1a9f6709 fix behavior of -c and -p commands 2023-05-20 08:56:50 +02:00
Daniel Hofstetter
698fafad68 mktemp: prioritize TMPDIR over -p when using -t 2023-05-20 08:02:37 +02:00
John Shin
9e8575dadd mkdir: add documentation for the use of allow attribute 2023-05-19 08:13:33 -07:00
John Shin
f592dff46a mkdir: skip setting dir permissions on windows 2023-05-18 19:34:57 -07:00
John Shin
b05c05eb45 mkdir: chmod of parent directories created by -p 2023-05-18 19:11:49 -07:00
Daniel Hofstetter
932f44d3dc more: support PageDown/PageUp keys 2023-05-18 15:24:49 +02:00
Daniel Hofstetter
74e73bee06
Merge pull request #4832 from sylvestre/issue_4821
mktemp -t foo.XXXX should create in TMPDIR
2023-05-18 14:12:40 +02:00
Sylvestre Ledru
cd189b2391 Fix mktemp -t -p ~/projects/playground foo.XXXX 2023-05-18 11:08:55 +02:00
Sylvestre Ledru
35b5fd6a40 mktemp -t foo.XXXX should create in TMPDIR 2023-05-18 11:08:55 +02:00
Jed Denlea
db5696f64b rm: support non-UTF-8 paths
Addresses #4868.
2023-05-17 23:01:21 -07:00
Ideflop
1ce52903b0
Merge branch 'uutils:main' into more_implement_print_over_and_clean_print 2023-05-17 22:47:07 +02:00
Ideflop
b676875c0c more: add arguments print over and clean print 2023-05-17 20:38:03 +02:00
Jed Denlea
3870ee252a yes: support non-UTF-8 args
Also, tighten the creation of the output buffer.  Rather than copy "y\n"
8192 times, or any other input some number of times, it can be doubled
in place using Vec::extend_from_within.
2023-05-15 11:29:14 -07:00
Sylvestre Ledru
369a2a6631
Simplify the declaration
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2023-05-15 10:12:28 +02:00
Sylvestre Ledru
3e7594632b ls: when facing an invalid utf-8, don't panic
Fails with
```
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "invalid-\xE0-"', src/uu/ls/src/ls.rs:1932:53
```
2023-05-14 22:11:44 +02:00
Daniel Hofstetter
690fff2fc9 cksum: implement --untagged 2023-05-14 16:43:14 +02:00
John Shin
a817186e10 cp: preserve permissions on -r -p --parents 2023-05-12 11:34:51 -07:00
Sylvestre Ledru
64c49de0cc
Merge pull request #4432 from jfinkels/dd-nocache
dd: support the [io]flag=nocache option
2023-05-12 09:53:57 +02:00
Sylvestre Ledru
22a7f98a47
Merge pull request #4856 from cakebaker/cksum_fix_algorithm_output
cksum: fix output of --algorithm
2023-05-11 18:18:24 +02:00
John Shin
7a31d841ba
cp: preserve permission on -p --parents (#4853) 2023-05-11 16:44:23 +02:00
Daniel Hofstetter
0781ad0a65 cksum: fix output of --algorithm
for the algorithms md5, sha[1,224,256,384,512], blake2b, and sm3 from

<digest> <filesize> <filename>

to

<algo name> (<filename>) = <digest>

to use the same format as GNU cksum
2023-05-11 14:24:43 +02:00
SteveLauC
452be5a220
ls: device number for BSDs and solarishOS (#4841) 2023-05-11 12:58:36 +02:00
renovate[bot]
7983e23d53
fix(deps): update rust crate memmap2 to 0.6 2023-05-09 18:00:46 +00:00
Daniel Hofstetter
3f40ec4db7 basenc: add help texts for options 2023-05-09 09:44:48 +02:00
Daniel Hofstetter
49fd7c5697
Merge pull request #4847 from sylvestre/boc
doc: show a warning when no tldr example
2023-05-09 08:07:53 +02:00
renovate[bot]
30c166ad40
fix(deps): update rust crate libc to 0.2.144 2023-05-08 16:28:38 +00:00
Sylvestre Ledru
caf9bfcadc doc: show a warning when no tldr example 2023-05-08 17:48:23 +02:00
Daniel Hofstetter
d769871374
Merge pull request #4831 from sylvestre/mv-hardlink
mv: 'mv source hardlink' should fail
2023-05-08 16:12:23 +02:00
Sylvestre Ledru
594f81a88a mv --backup=simple a b on hard links should not fail
touch a
ln a b
./target/debug/coreutils mv --backup=simple a b

GNU: tests/mv/hard-4.sh
2023-05-08 13:08:20 +02:00
Daniel Hofstetter
f9536e9914
Merge pull request #4842 from sylvestre/aze
dd: fix some clippy warnings 'variable does not need to be mutable'
2023-05-08 07:44:55 +02:00
Sylvestre Ledru
1b99376d95 mv: split exec into smaller functions 2023-05-07 23:08:44 +02:00