Daniel Hofstetter
2e77d99dd4
expr: fail fast if there are no operands
2023-11-23 14:35:02 +01:00
Sylvestre Ledru
af021e0d4f
Merge pull request #5559 from pawelngei/expr-substr-error
...
expr: different stderr with `expr "56" "substr"`
2023-11-22 14:56:42 +01:00
Terts Diepraam
e95add7940
uucore/format: fix license headers and improve docs
2023-11-22 14:06:03 +01:00
renovate[bot]
3425ee8d59
fix(deps): update rust crate data-encoding-macro to 0.1.14
2023-11-22 06:09:44 +00:00
renovate[bot]
18b5c22567
fix(deps): update rust crate data-encoding to 2.5
2023-11-21 22:24:11 +00:00
Zhuoxun Yang
17d21d2d9c
expr: check prefix operation
2023-11-21 22:05:41 +08:00
Terts Diepraam
da7c168f9d
all: reduce imports needed for show and show_if_err macros
2023-11-21 12:49:07 +01:00
ALXD
d2ede92736
expr: make error messages align with GNU expr
2023-11-21 10:14:24 +01:00
Terts Diepraam
5c04283d6e
printf: address fmt, clippy, spelling and failing test
2023-11-21 00:42:02 +01:00
Terts Diepraam
6d2698b802
Merge branch 'main' into printf-rewrite
2023-11-20 13:53:11 +01:00
Terts Diepraam
68d036c9a2
printf: basic support for unicode escape sequences
2023-11-20 13:45:02 +01:00
Terts Diepraam
066d8ba73d
printf: coerce missing and invalid arguments to 0
2023-11-20 13:25:20 +01:00
Terts Diepraam
c43ee01d19
printf: allow precision in string
2023-11-20 12:38:26 +01:00
clara swanson
58087df02a
stdbuf: remove crash macro ( #5549 )
...
* stdbuf: remove crash! macro
* stdbuf: change target_vendor back to apple
* tests/stdbuf: change stderr_only to usage_error in test_stdbuf_invalid_mode_fails
* stdbuf: add exit code to check_option
* stdbuf: remove set_exit_code line from error
2023-11-20 10:16:18 +01:00
Daniel Hofstetter
285e580b6e
cp: improve error msg if -r is not specified
2023-11-20 09:15:15 +01:00
Yury Zhytkou
eb00c195c6
split: pass GNU tests/b-chunk.sh ( #5475 )
...
---------
Co-authored-by: Terts Diepraam <terts.diepraam@gmail.com>
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
Co-authored-by: Brandon Elam Barker <brandon.barker@gmail.com>
Co-authored-by: Kostiantyn Hryshchuk <statheres@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2023-11-17 17:19:10 +01:00
Terts Diepraam
5f2374b339
printf: fix negative hex argument parsing
2023-11-17 14:57:09 +01:00
Terts Diepraam
955640aac8
printf: fix and test float formatting
2023-11-17 14:46:38 +01:00
Terts Diepraam
4aafb3f88b
printf: exit correctly on \c
2023-11-17 14:46:00 +01:00
Terts Diepraam
76eca8d999
uucore/format: fix doctests
2023-11-17 14:43:25 +01:00
Terts Diepraam
f3da0817a5
printf: support precision for integers
2023-11-17 14:42:52 +01:00
Terts Diepraam
f83e0d1b04
printf: accept multiple length parameters
2023-11-17 14:41:42 +01:00
Terts Diepraam
cd0c24af07
printf: implement %b
2023-11-17 14:41:14 +01:00
Terts Diepraam
a45ff8ca73
printf: more flexible parsing of unparsed arguments
2023-11-17 14:39:39 +01:00
Daniel Hofstetter
a7e5af4770
Merge pull request #5540 from cswn/join-remove-crash-macro
...
join: remove crash! macro
2023-11-17 07:00:55 +01:00
Terts Diepraam
eaf5006379
printf: parse arguments and handle escape codes
2023-11-16 17:00:41 +01:00
Daniel Hofstetter
2f9fcf73fa
clippy: fix warnings introduced by Rust 1.74
2023-11-16 16:21:28 +01:00
Terts Diepraam
e7d58f673f
seq: simplify and use new printf implementation
2023-11-16 14:29:49 +01:00
cswn
65dc70b553
join: remove match in uumain and return exec result
2023-11-16 12:02:39 +01:00
cswn
a064c88656
join: replace match with JoinError with map_err_context
2023-11-16 09:35:32 +01:00
ALXD
b3eae16fad
printf: intf: change warning and exit code
2023-11-15 17:50:34 +01:00
cswn
5dff5f2f73
join: rename f variable to file_buf
2023-11-15 13:52:01 +01:00
cswn
94f6702ba5
join: remove crash! macro
2023-11-15 13:20:22 +01:00
Daniel Hofstetter
0db834e04c
Merge pull request #5533 from cswn/split-remove-crash-macro
...
split: remove crash macro
2023-11-15 10:14:43 +01:00
Sylvestre Ledru
3f86bc59de
add missing features to uucore
2023-11-15 08:31:53 +01:00
cswn
c4580df2a4
split: remove crash macro
2023-11-14 18:07:35 +01:00
Sylvestre Ledru
ff92bfb25b
Prepare version 0.0.23
2023-11-13 22:02:01 +01:00
Terts Diepraam
6481d63ea4
uucore/format: implement single specifier formats
2023-11-13 15:22:49 +01:00
Terts Diepraam
0a07d47243
Merge pull request #5493 from cakebaker/du_inodes_with_count_links
...
du: make -l/--count-links work
2023-11-13 13:12:35 +01:00
Daniel Hofstetter
7202d01767
Merge pull request #5510 from ceteece/expand-remove-crash-macro
...
expand: remove crash! macro
2023-11-10 14:42:23 +01:00
clint
a29ddea4e9
expand: clarify tabstops argument name for expand_line
2023-11-09 15:58:12 -05:00
Daniel Hofstetter
85777e6a42
du: rename inodes -> seen_inodes
2023-11-09 16:11:56 +01:00
Daniel Hofstetter
12e61d451c
du: make -l/--count-links work
2023-11-09 16:07:02 +01:00
Terts Diepraam
ee0e2c042b
dd: use num_format::Float directly instead of printf
2023-11-09 16:05:38 +01:00
Terts Diepraam
39c6758475
uucore/format: move types for num_format
2023-11-09 16:05:11 +01:00
Terts Diepraam
198f7c7f26
printf: move number formatting to separate module
2023-11-09 15:48:26 +01:00
Daniel Hofstetter
6fa8a6d200
Merge pull request #5501 from alexhausen/du-remove-crash-macro
...
du: remove crash! macro
2023-11-09 10:04:37 +01:00
clint
fc00b6bfc9
expand: move logic to expand a single line into its own function
2023-11-08 23:36:46 -05:00
Zhuoxun Yang
e3ec12233b
printf: support %q
2023-11-09 10:17:44 +08:00
Zhuoxun Yang
7279bc1741
printf.md: support %q
2023-11-09 10:16:53 +08:00
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