Sylvestre Ledru
033fd62f6a
Merge pull request #3047 from hbina/hbina-touch-better-msg-when-no-args
...
touch: Better error messages when no args is provided
2022-02-04 10:27:01 +01:00
Sylvestre Ledru
edce04e8ee
Merge pull request #3059 from jfinkels/df-options-parsing
...
df: create Options::from() function to contain the code for parsing ArgMatches
2022-02-04 08:22:11 +01:00
Jeffrey Finkelstein
639971e520
df: refactor function for parsing CLI args
...
Add a `Options::from()` function to collect the code for parsing an
`Options` object from the `clap::ArgMatches` object.
2022-02-03 23:19:14 -05:00
Jeffrey Finkelstein
3fbaa79359
dd: add support for 'b' and 'x' multipliers
...
Support the suffix 'b' (multiply by 512) and 'x' (multiply by an
arbitrary amount) when specifying numeric arguments to dd.
2022-02-03 21:56:13 -05:00
snobee
f7e31f6008
stat: allow formatting of negative numbers
2022-02-03 16:01:19 -08:00
Roy Ivy III
f01c3ef46a
maint/polish ~ whitespace normalization
2022-02-03 15:00:05 -06:00
Roy Ivy III
caad4db712
maint/CICD ~ add MSRV check for '.clippy.toml'
2022-02-03 15:00:05 -06:00
Hanif Ariffin
e60b581c38
test_sort: Preserve the environment variable when executing tests ( #3031 )
...
* test_sort: Output sorted files to a file with different name
Signed-off-by: Hanif Bin Ariffin <hanif.ariffin.43262@gmail.com>
* Fix the test by saving the environment variable
Signed-off-by: Hanif Bin Ariffin <hanif.ariffin.43262@gmail.com>
Co-authored-by: Hanif Bin Ariffin <hanif.ariffin.43262@gmail.com>
2022-02-03 16:02:50 +01:00
Hanif Ariffin
861437addf
Fix small clippy issue
...
Signed-off-by: Hanif Ariffin <hanif.ariffin.4326@gmail.com>
2022-02-03 21:45:02 +08:00
Hanif Bin Ariffin
3586465917
dont use is_numeric to check for digits
...
Signed-off-by: Hanif Bin Ariffin <hanif.ariffin.43262@gmail.com>
2022-02-03 21:42:22 +08:00
snobee
ee721ebf4e
head: handle multibyte numeric utf-8 chars
2022-02-03 21:42:22 +08:00
Hanif Ariffin
9cd65c766a
Add tests
...
Signed-off-by: Hanif Ariffin <hanif.ariffin.4326@gmail.com>
2022-02-03 21:14:56 +08:00
Hanif Ariffin
ff8a83b256
touch: Better error message when no args is given
...
Matches the behavior of GNU touch
```shell
hbina@akarin ~/g/uutils (hbina-realpath-absolute-symlinks)> touch > /dev/null
touch: missing file operand
Try 'touch --help' for more information.
hbina@akarin ~/g/uutils (hbina-realpath-absolute-symlinks) [1]> cargo run --quiet -- touch > /dev/null
touch: missing file operand
Try 'touch --help' for more information.
hbina@akarin ~/g/uutils (hbina-realpath-absolute-symlinks) [1]> cargo run --quiet -- touch 2> /dev/null
hbina@akarin ~/g/uutils (hbina-realpath-absolute-symlinks) [1]> touch 2> /dev/null
```
Signed-off-by: Hanif Ariffin <hanif.ariffin.4326@gmail.com>
2022-02-03 21:10:39 +08:00
Hanif Bin Ariffin
c4c666814b
Merge branch 'main' of github.com:uutils/coreutils into hbina-test_ls_order_time-is-flaky
2022-02-03 19:57:13 +08:00
Sylvestre Ledru
2d3b8db9ed
Merge pull request #3012 from shoriminimoe/2951-truncate
...
truncate: change cli error return code
2022-02-03 10:43:16 +01:00
Eli Youngs
d50c9c3e77
Fail when copying a directory to a file
2022-02-02 23:59:32 -08:00
Sylvestre Ledru
b411d91fac
Merge pull request #3014 from HeroicKatora/main
...
Make true return false less frequently
2022-02-02 21:43:21 +01:00
Sylvestre Ledru
1fa4b539e7
Merge pull request #3038 from DevSabb/shuf-about
...
Include ABOUT for shuf
2022-02-02 21:42:58 +01:00
DevSaab
773ceb5534
Include ABOUT for shuf
2022-02-02 10:08:48 -05:00
Sylvestre Ledru
57231e6543
Merge pull request #3030 from rahulkadukar/hostid-description
...
hostid: added description in documentation
2022-02-02 10:29:26 +01:00
Sylvestre Ledru
64f3cd748d
Merge pull request #2976 from danieleades/lint
...
add additional lints
2022-02-02 09:55:57 +01:00
Rahul Kadukar
7e32b6ba17
Added description for hostid
2022-02-01 23:51:48 -05:00
Hanif Bin Ariffin
560cd74a63
test_ls: Do not rely on the system time of metadata'access time
...
Signed-off-by: Hanif Bin Ariffin <hanif.ariffin.43262@gmail.com>
2022-02-02 12:49:40 +08:00
Nathan
29b613a852
printf: resolve formatting nit in LONGHELP strings
...
Removed 1 preceeding space for LONGHELP_LEAD and 2 preceeding spaces for LONGHELP_BODY
2022-02-01 22:36:10 -05:00
Nathan
f6174dd946
printf: add description and version
...
Adds a version number and brief description to the printf utility in the user documentation
2022-02-01 19:28:39 -05:00
Tillmann Rendel
3bfcf78c03
Tweak comment in extensions.json
...
To flush the highlighting cache.
2022-02-01 23:38:18 +01:00
Tillmann Rendel
d26f6f0f2f
Format cspell config and tweak comments
...
Mostly to flush the highlighting cache on GitHub, but hopefully it also
improves the file.
2022-02-01 23:36:50 +01:00
Tillmann Rendel
90b96095af
Merge branch 'main' into gitattributes
2022-02-01 23:33:39 +01:00
Tillmann Rendel
587e6d2ded
Move back to .vscode folder
2022-02-01 23:33:24 +01:00
Sam Caldwell
39f8329222
truncate: use map_err
instead of unwrap_or_else
2022-02-01 14:13:52 -07:00
Rishi Kumar Ray
f117fd8dd6
added correct format to ABOUT
2022-02-02 02:40:59 +05:30
Sam Caldwell
ea5541db56
truncate: add test_invalid_option
2022-02-01 13:42:50 -07:00
Terts Diepraam
87e582b5e0
Merge pull request #2977 from Dr-Emann/echo_octal_nul
...
echo: Allow echo with escapes to work with `\0`
2022-02-01 20:13:53 +01:00
Andreas Molzer
c6d5eccf6c
false,true: Resolve formatting nit in About
2022-02-01 19:53:25 +01:00
Tillmann Rendel
864b09c9b8
vscode: only recommend rust-analyzer ( #3020 )
...
Previously, both RLS and Rust-Analyzer were recommended, now we just recommend RA.
2022-02-01 19:47:49 +01:00
Tillmann Rendel
420045210c
Try moving .gitattributes to root
2022-02-01 15:27:59 +01:00
Tillmann Rendel
dbbabedec6
Allow comments in VS Code configuration
...
Since JSON formally cannot contain comments, GitHub highlights comments
in JSON files as errors, but the configuration files for VS Code
in this repository contain comments. This commit configures GitHub to
use a different syntax highlighter for the affected files.
2022-02-01 15:09:51 +01:00
Andreas Molzer
23a544c485
false,true: Implement custom help, version
...
This avoids hacking around the short options of these command line
arguments that have been introduced by clap. Additionally, we test and
correctly handle the combination of both version and help. The GNU
binary will ignore both arguments in this case while clap would perform
the first one. A test for this edge case was added.
2022-02-01 14:29:26 +01:00
Andreas Molzer
c1e108933f
false,true: Align behavior of short flags to GNU
2022-02-01 13:02:22 +01:00
Andreas Molzer
149399c1bf
false,true: Add by-util tests for options
2022-02-01 13:02:18 +01:00
Andreas Molzer
dcf177f908
false: Align behavior to true and GNU
2022-02-01 12:04:23 +01:00
Andreas Molzer
b29e219e4d
true: Rework to return true more often
...
Now treats recognized command line options and ignores unrecognized
command line options instead of returning a special exit status for
them.
There is one point of interest, which is related to an implementation
detail in GNU `true`. It may return a non-true exit status (in
particular EXIT_FAIL) if writing the diagnostics of a GNU specific
option fails. For example `true --version > /dev/full` would fail and
have exit status 1.
This behavior was acknowledged in gnu in commit
<9a6a486e6503520fd2581f2d3356b7149f1b225d>. No further
justification provided for keeping this quirk.
POSIX knows no such options, and requires an exit status of 0 in all
cases. We replicate GNU here which is a consistency improvement over the
prior implementation. Adds documentation to clarify the intended
behavior more properly.
2022-02-01 09:13:00 +01:00
Sylvestre Ledru
a764fdfb8e
Merge pull request #3005 from jtracey/patch-4
...
README: mark join as done
2022-02-01 08:57:49 +01:00
Linux User
d762bebc1c
update shell scripts according to shellcheck recommendations and minor cleanup
2022-02-01 06:55:11 +00:00
Sam Caldwell
e1f7c774d8
Remove redundant import
2022-01-31 22:59:10 -07:00
Sam Caldwell
6f24166c63
[truncate] handle unused_must_use warning
2022-01-31 22:25:59 -07:00
Sam Caldwell
cd1b5c5748
[truncate] change cli error return code
...
Exit with status code 1 for argument parsing errors in `truncate`. When
`clap` encounters an error during argument parsing, it exits with status
code 2. This causes some GNU tests to fail since they expect status code
1.
2022-01-31 22:08:59 -07:00
Justin Tracey
482b292ba3
README: mark join as done
...
Closes #2634 .
2022-01-31 22:30:22 +00:00
Narasimha Prasanna HN
1194a8ce53
Fix: Update quick-error crate version from 1.2.3 to 2.0.1 in src/uu/cp ( #2947 )
...
fix: update quick-error crate from 1.2.3 to 2.0.1 for src/uu/cp tool, fixes: #2941
2022-01-31 21:56:47 +01:00
Terts Diepraam
7fc82cd376
Merge pull request #2902 from jtracey/join-non-unicode-sep
...
join: add support for non-unicode field separators
2022-01-31 21:54:56 +01:00