Alexandre Hausen
4d40555cd5
fixup! du: remove crash! macro
2023-11-08 20:32:03 -03:00
clint
3411c25112
expand: make error output the same as it was
2023-11-07 20:18:58 -05:00
clint
46d4ebff4c
expand: remove crash! macro
2023-11-07 18:02:13 -05:00
Sylvestre Ledru
4a3efadf70
Merge pull request #5506 from cakebaker/du_h_dereference_args
...
du: add -H (alias for --dereference-args)
2023-11-07 13:05:41 +01:00
Terts Diepraam
188b26e8aa
Merge pull request #5504 from cakebaker/du_use_blocks
...
du: use blocks to remove some cfgs
2023-11-07 12:03:41 +01:00
Taylor
6678c17c52
mktemp: add func to expose functionality (for use in nushell) ( #5479 )
...
* mktemp: add func to expose functionality
* mktemp: cleanup
2023-11-07 11:43:58 +01:00
Daniel Hofstetter
7afb8461cb
du: add -H (alias for --dereference-args)
2023-11-07 10:30:54 +01:00
Daniel Hofstetter
993a995f8a
du: remove unnecessary return
2023-11-06 10:22:01 +01:00
Daniel Hofstetter
2571af8ede
du: use blocks to remove some cfgs
2023-11-06 10:15:47 +01:00
Alexandre Hausen
e11878e7ba
du: remove crash! macro
2023-11-05 20:58:04 -03:00
Kostiantyn Hryshchuk
6ac1af6953
Fix clippy::implicit_clone
2023-11-04 21:04:29 +01:00
Brandon Elam Barker
44d105d015
Add support in uucore for illumos and solaris ( #5489 )
...
* uucore support for illumos and solaris
* use macro to consolidate illumos and solaris signals
* fixing some CI issues
* replaced macro with better cfg usage
2023-11-04 12:31:11 +01:00
Daniel Hofstetter
29f6631554
du: add -P/--no-dereference
2023-11-03 17:17:44 +01:00
Daniel Hofstetter
f8c474ecb3
Merge pull request #5449 from zhitkoff/split-suffix-length-refactor
...
split: suffix length refactor
2023-11-03 08:28:48 +01:00
Daniel Hofstetter
0cad85f2fb
Merge pull request #5486 from tertsdiepraam/cp-remove-crash-call
...
`cp`: remove `crash!` call
2023-11-03 08:23:24 +01:00
zhitkoff
62887c7a58
split: directory separator in additional suffix
2023-11-02 17:17:38 +01:00
zhitkoff
f05474a33a
split: slash separator
2023-11-02 17:17:38 +01:00
zhitkoff
8372a3d2cc
split: refactor filename suffix
2023-11-02 17:17:38 +01:00
zhitkoff
fbb454a080
split: suffix auto-widening and auto-width tests
2023-11-02 17:17:38 +01:00
zhitkoff
733359d48b
split: refactor suffix auto-widening and auto-width
2023-11-02 17:17:38 +01:00
Terts Diepraam
a6522e0114
cp
: remove crash!
call
...
It seems to be unnecessary since we have already made the path relative
using `construct_dest_path`.
2023-11-02 16:23:31 +01:00
tommady
a4775d288b
cp: fix cp -rT dir dir2 leads to different result than with GNU cp ( #5467 )
...
* add a test case test_cp_treat_dest_as_a_normal_file
* fix 5457
* cp: fix comment
---------
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2023-10-30 17:55:03 +01:00
Daniel Hofstetter
f39ab620a6
cat: use error code 62 for ELOOP on FreeBSD
2023-10-30 07:14:26 +01:00
Daniel Hofstetter
9697f56e94
Merge pull request #5462 from kostikbel/main
...
freebsd: fix the 'df' command
2023-10-29 13:51:16 +01:00
Sylvestre Ledru
c24a51403a
cat: return the same error message as GNU with loop symlink ( #5466 )
...
* cat: return the same error message as GNU with loop symlink
Should fix tests/du/long-sloop.sh because it is using cat as a ref
for error messages
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2023-10-28 22:29:24 +02:00
Terts Diepraam
f117fc1bab
printf rewrite: fix compilation
2023-10-28 17:36:43 +02:00
Daniel Hofstetter
e887944ef1
Remove "last synced with" comments
2023-10-28 16:53:09 +02:00
Terts Diepraam
28810906a3
Merge branch 'main' into printf-rewrite
2023-10-28 16:35:58 +02:00
Mick van Gelderen
5c100dd088
mv: Fix stderr output mv file into dir and dir into file where both are files ( #5464 )
...
* Add tests mv file into dir and dir into file where both are files
* Fix test_mv_dir_into_file_where_both_are_files
* Fix test_mv_file_into_dir_where_both_are_files
* Store String in error instead of PathBuf
* Implement path_ends_with_terminator for windows
* Fix compilation on windows
2023-10-28 15:04:51 +02:00
Daniel Hofstetter
9f63ae6645
fsext: add getmntinfo to spell-checker:ignore
2023-10-27 14:25:41 +02:00
Konstantin Belousov
11f56a79af
freebsd: fix the 'df' command
...
df, and perhaps other commands, get the list of the mounted filesystems
with the call to getmntinfo(3). Since Rust still use FreeBSD 11.x ABI
for filesystem metadata call, it should use matching versioned symbol for
getmntinfo from libc.
2023-10-27 12:38:20 +03:00
Daniel Hofstetter
32b335a73a
mv: rename canonized_* -> canonicalized_*
2023-10-25 16:46:33 +02:00
Daniel Hofstetter
6085cf12e3
Merge pull request #5353 from tommady/fix-5327
...
cp: fix cp -a --no-preserve=mode doesn't keep fully the mode
2023-10-25 13:34:45 +02:00
Terts Diepraam
96d0830952
Merge pull request #5446 from cakebaker/ls_try_get_matches_from
...
ls: use try_get_matches_from instead of get_matches_from
2023-10-25 11:25:40 +02:00
Daniel Hofstetter
f8a30d524e
cp: rename handling_no_preserve_mode
...
to handle_no_preserve_mode
2023-10-25 10:43:23 +02:00
Daniel Hofstetter
086f7b548c
cp: replace word in comment
2023-10-25 10:20:01 +02:00
Daniel Hofstetter
6f84e56e28
ls: return exit code 2 for invalid time-style
2023-10-24 16:33:04 +02:00
Daniel Hofstetter
fd18d2686f
ls: return exit code 2 for -l --dired --zero
2023-10-24 14:48:24 +02:00
David Matos
769eb29cd3
mv: moving directory itself should fail ( #5429 )
...
* mv: moving directory itself should fail
* mv: Check trailing slash also fails on target containing itself
* mv: add "spell-checker:ignore mydir" to test
---------
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2023-10-24 10:54:23 +02:00
Daniel Hofstetter
d7b7dfeb16
ls: use try_get_matches_from instead of
...
get_matches_from to replace clap's exit code
2023-10-24 10:07:28 +02:00
Yury Zhytkou
a3fed79b5c
split
: suffix auto length (#5433 )
2023-10-23 22:47:39 +02:00
Sylvestre Ledru
209ffe831d
Merge pull request #5441 from n1000/test_ot_fix
...
test: use mtime for -ot and fix direction of comparison
2023-10-23 20:59:30 +02:00
Daniel Hofstetter
aa2e9c11bc
Merge pull request #5439 from sylvestre/runcon-error
...
runcon: generate the same error as GNUs
2023-10-23 07:28:23 +02:00
Nathan Houghton
dbfd700502
test: use mtime for -ot and fix direction of comparison
...
- Use the file modification time instead of the creation time (matches
GNU coreutils documentation)
- Fix direction of comparison (a < b instead of a > b)
- Extend test case to cover both the 0 and 1 exit code cases
2023-10-22 17:44:40 -07:00
Sylvestre Ledru
03d598d08b
Merge pull request #5430 from cakebaker/cp_remove_destination_shouldnt_fail
...
cp --remove-destination: don't fail if destination is symlink to source
2023-10-22 22:17:32 +02:00
Sylvestre Ledru
897af02d9d
runcon: generate the same error as GNUs
...
tested in tests/runcon/runcon-no-reorder.sh
2023-10-22 21:43:49 +02:00
Sylvestre Ledru
4472acf909
ls --dired: document the whole thing
2023-10-20 13:29:38 +02:00
Daniel Hofstetter
772892e2e4
cp: --rem don't fail if dest is symlink to source
2023-10-20 09:41:30 +02:00
Yury Zhytkou
eede467e21
split
: --filter
and stdin updates (#5418 )
2023-10-20 08:47:32 +02:00
Sylvestre Ledru
f971a69d69
ls --dired -R: fix the positions ( #5341 )
...
* move get_offset_from_previous_line into a specific function
* dired: improve the -R support
* dired: fix the display with subdir
* ls --dired -R: fix the positions
* ls --dired -R: verify also the SUBDIRED coordinate
* ls --dired -R: add a long file name and fix a windows test
* dired: always put dired first in the args + minor fixes
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
* ls: add cognitive_complexity to silent a warning
---------
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2023-10-19 14:17:34 +02:00
Daniel Hofstetter
383dcde51a
mv: comment why some imports are public
2023-10-19 10:08:45 +02:00
David Matos
90c2dbb0cc
mv: make UpdateMode public
2023-10-19 09:50:21 +02:00
Daniel Hofstetter
a3c6d6d91e
Merge pull request #5423 from Luv-Ray/fix-pathchk-issue5314
...
`pathchk`: check empty path by default
2023-10-19 09:33:42 +02:00
Sylvestre Ledru
4573eb693f
Merge pull request #5357 from zhitkoff/issue5334-uucore-parse-r-q
...
Implement SI prefixes R and Q
2023-10-18 18:55:17 +02:00
Zhuoxun Yang
1ab8555a94
pathchk: check empty path
2023-10-18 22:50:43 +08:00
Daniel Hofstetter
a2defd1a21
uucore: remove incorrect comment
2023-10-18 16:34:35 +02:00
Daniel Hofstetter
7a608196dc
Merge pull request #5356 from terade/refactoring_prompt_file
...
`rm`: refactor `prompt_file`, issue #5345
2023-10-18 07:04:22 +02:00
terade
b6a6a4dc65
rm: apply suggestion of retrieving metatada in function
2023-10-17 17:26:27 +02:00
zhitkoff
abc95361a5
prase_size: comments
2023-10-17 10:50:50 -04:00
zhitkoff
74e01e3987
parse_size: more test case coverage
2023-10-17 10:50:50 -04:00
zhitkoff
cb7479e823
uucore: implement SI suffixes R and Q
2023-10-17 10:50:50 -04:00
Zhuoxun Yang
d325a952ee
expr: return "0" for |
2023-10-17 22:27:47 +08:00
Zhuoxun Yang
8a67224917
expr: add assert for &
2023-10-17 22:27:10 +08:00
Daniel Hofstetter
ce0cf7a569
Merge pull request #5367 from sylvestre/join
...
join: remove a clippy::cognitive_complexity by moving some content in functions
2023-10-16 11:41:47 +02:00
Sylvestre Ledru
f8436728dc
add field_reassign_with_default ignore
...
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2023-10-16 10:47:38 +02:00
Daniel Hofstetter
541ac6a813
Merge pull request #5403 from sylvestre/rm
...
rm: In some cases, remove_dir is doing a better job than remove_dir_all
2023-10-16 09:35:44 +02:00
Sylvestre Ledru
3a780453a9
join: remove a clippy::cognitive_complexity by moving some content into functions
2023-10-16 08:15:02 +02:00
renovate[bot]
c892c9346f
fix(deps): update rust crate dns-lookup to 2.0.4
2023-10-15 17:59:54 +00:00
Sylvestre Ledru
73b7c46131
Merge pull request #5409 from sylvestre/version-22
...
0.0.21 => 0.0.22
2023-10-15 15:50:01 +02:00
Sylvestre Ledru
e1bd47d549
0.0.21 => 0.0.22
2023-10-15 14:33:23 +02:00
Daniel Hofstetter
6ef5b272da
expr: add missing word to comment
2023-10-15 14:30:17 +02:00
Zhuoxun Yang
4f20773b4f
expr: fix escape
2023-10-14 23:20:45 +08:00
Sylvestre Ledru
226680aa00
Ignore inacc spell
2023-10-14 13:45:29 +02:00
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