Commit graph

129 commits

Author SHA1 Message Date
Sylvestre Ledru
6a109a5069
Merge pull request #1834 from jhscheer/patch-3
rm: add an additional flag -R for --recursive
2021-03-17 21:52:02 +01:00
Sylvestre Ledru
ba55ef166e
Merge pull request #1827 from drocco007/numfmt-delimiter
numfmt: implement --delimiter
2021-03-17 21:50:47 +01:00
Daniel Rocco
fbb9c50050 tr: process octal escape sequences
closes #1817
2021-03-17 08:04:45 -04:00
Jan Scheer
867e117c99
Update test_rm.rs 2021-03-17 10:20:08 +01:00
Sylvestre Ledru
618d4a4fa5
Merge pull request #1825 from cbjadwani/uniq-utf8-issues
uniq: utf-8 issues
2021-03-16 21:18:31 +01:00
Daniel Rocco
52f2ab6898 numfmt: implement --delimiter
closes #1454
2021-03-15 11:55:56 -04:00
Andre Julius
53c3fedf33 sleep: Add more test cases
As mentioned here:
https://github.com/uutils/coreutils/pull/1777#discussion_r593807712
2021-03-15 14:36:38 +01:00
Chirag Jadwani
ce4342d12e uniq: Fix panic on invalid utf-8 input 2021-03-15 18:48:54 +05:30
Sylvestre Ledru
2c09556964 rustfmt some tests 2021-03-13 23:30:47 +01:00
Andre Julius
2158b2c5b4
sleep: move from getopts to clap #1735 (#1777)
and Add some sleep test cases #1735
2021-03-13 23:11:11 +01:00
Terts Diepraam
fd5ec099d0
touch: use an ArgGroup for sources and turn macros into functions (#1813)
* touch: use arggroup for sources

* tests/touch: add tests for multiple sources

* touch: turn macros into functions

* test/touch: fmt

* touch: constant for the sources ArgGroup
2021-03-13 17:20:39 +01:00
Michael Kefeder
e1626b8c64
ptx: ignore empty regex (#1808)
* ptx: ignore empty -W regex

* ptx: test to verify empty -W regex is ignored

* tests/ptx: verify word regexp from cmd-line is used
2021-03-12 21:52:37 +01:00
Ali
5ced3a670b
paste: cleanup multi-stdin support (#1803)
cleaner impl for multi-stdin support
2021-03-12 13:26:09 +01:00
Craig Pastro
3ab114f283
cp: Implement --parents & --parent (#1797) 2021-03-12 13:25:15 +01:00
Ali
374a4fde86
paste: support multi-stdin (#1791)
- added `-` as the default input, since `paste` reads stdin if no file
is provided
- `paste` also supports providing `-` multiple times
- added a test for it
2021-03-10 23:19:12 +01:00
Benjamin Fox
5446ea2abf cp: implement --strip-trailing-slashes 2021-03-09 12:59:26 +02:00
Daniel Rocco
0e02607dc7 numfmt: implement --field 2021-03-08 10:53:34 -05:00
Chad Brewbaker
c820329efd
muted test not for windows and added windows temp file convention (#1748)
* muted test not for windows and added windows temp file convention

* Update mktemp.rs

Revert windows mktmp template difference

Co-authored-by: Chad Brewbaker <chad@flyingdogsolutions.com>
2021-03-06 18:26:55 +01:00
Daniel Rocco
d06f91fbe2
numfmt: align format output values with GNU (#1745)
When converting to SI or IEC, produce values that align with the conventions
used by GNU numfmt.

- values > 10 are represented without a decimal place, so 10000 becomes 10K
  instead of 10.0K

- when truncating, take the ceiling of the value, so 100001 becomes 101K

- values < 10 are truncated to the highest tenth, so 1001 becomes 1.1K

closes #1726
2021-03-06 18:26:05 +01:00
Sylvestre Ledru
c06967a45a rustfmt two files 2021-02-23 20:56:41 +01:00
Chad Brewbaker
bb54669a5d
Fix macOS aarch64 compile errors (#1724) 2021-02-23 10:25:06 +01:00
Alex Lyon
5431e947bc
uucore: process: fix exit status processing (#1743)
* uucore: process: fix exit status processing

* tests: timeout: check whether subcommand exit codes are returned
2021-02-23 10:21:01 +01:00
James Robson
0dbed0fd59 Do not allow seq to run with an increment of zero 2021-02-18 21:10:53 +00:00
Chad Brewbaker
05d8cc59c4
bug(wc): Add a test for unexpected behavior (#1723) 2021-02-16 13:36:49 +01:00
Daniel Rocco
f595164063 numfmt: prohibit --header=0 to align with GNU
Adjust header option handling to prohibit passing a value of 0 to align
with GNU numfmt. Also report header option parse errors as GNU does.

closes #1708
2021-02-15 08:14:44 +01:00
Daniel Rocco
f8006f47df
numfmt: handle leading whitespace & implied padding (#1721)
Align with GNU numfmt by trimming leading whitespace from supplied values.
If the user did not specify a padding, calculate an implied padding from
the leading whitespace and the value.

Also track closer to GNU numfmt’s error message format.
2021-02-14 09:04:29 +01:00
Felipe Lema
35a7f01d15
Refactor(split) - migrate from getopts to clap (#1712) 2021-02-11 20:45:23 +01:00
Sylvestre Ledru
51383e10e6
Fix: install /dev/null target (#1646)
* fix(install): workaround the /dev/null bug

Caused by a limitation of fs::copy in rust. see:
https://github.com/rust-lang/rust/issues/79390
2021-02-11 15:59:58 +01:00
Sylvestre Ledru
6c8af26e7f
fix(cp) - make "cp /dev/null target" work (#1674) 2021-02-11 15:59:20 +01:00
Sylvestre Ledru
b8987f3d5f
fix(mktemp) - Make mktemp --tempdir foo.XXXXXX works (#1716)
Used by apt-key
2021-02-11 00:03:23 +01:00
Chad Brewbaker
6c2bca110d
Fixed wc -L no end of line LF bug (#1714) 2021-02-08 21:54:48 +01:00
Sylvestre Ledru
cacaf0cde8 bug(fmt): just like the GNU version, fails when -W is bigger than 2500
Closes: #1704
2021-01-25 08:45:33 +01:00
Sylvestre Ledru
992c113f09 Remove some old code 2021-01-22 09:40:38 +01:00
Sylvestre Ledru
18370f39b8 Remove some warnings 2021-01-22 09:40:38 +01:00
Sylvestre Ledru
b8d0467da8 test(realpath): improve the coverage 2021-01-19 20:56:27 +01:00
Sylvestre Ledru
e331186fee
unbreak build with rustc 1.32: force tempfile 3.1.0 (#1695) 2021-01-19 08:15:53 +01:00
Sylvestre Ledru
013bb285cd
bug(chmod): chmod on symlink pointing to non existing file is failing (#1694) 2021-01-18 23:09:00 +01:00
Felipe Lema
88911be6e0
--filter argument for split (#1681) 2021-01-18 14:42:44 +01:00
jaggededgedjustice
18c39daed7
fold: Handle input with newlines (#1680)
The read_line function appends to the given buffer which is never
cleared. This leads to lines being duplicated.
2021-01-05 09:10:01 +01:00
Sylvestre Ledru
4a23a1a218 feature(ln): Implement -n 2021-01-03 18:55:53 +01:00
Sylvestre Ledru
7f1d47b77a refactor(ln): move to clap 2021-01-02 22:35:21 +01:00
Sylvestre Ledru
90722c1f3c
Merge pull request #1677 from sylvestre/mktemp-t
feature(mktemp): implement -t
2021-01-02 21:10:59 +01:00
Sylvestre Ledru
105e2cb26f feature(mktemp): implement -t
Deprecated but used in various places:
https://sources.debian.org/src/libreoffice/1:7.0.4-1/solenv/gbuild/platform/solaris.mk/?hl=22#L22
https://sources.debian.org/src/glibc/2.31-6/malloc/memusage.sh/?hl=225#L225
https://sources.debian.org/src/sbox-dtc/1.11.7-1/debian/postinst/?hl=20#L20
2021-01-02 13:07:27 +01:00
Sylvestre Ledru
94e293f2bf fix formatting fr test_seq 2021-01-02 10:14:18 +01:00
Sylvestre Ledru
a2d6c85e44 test(cp): cp /dev/null target is supposed to work. Add a test 2021-01-02 10:02:51 +01:00
Sylvestre Ledru
bc4c82b132 Fix some clippy warnings 2020-12-29 00:47:59 +01:00
Sylvestre Ledru
3a1eb1e05f Various fixes before landing csplit 2020-12-28 17:22:02 +01:00
Stéphane Campinas
89bf7a726e csplit: refresh of the previous PR 2020-12-28 17:21:29 +01:00
Sylvestre Ledru
da362ced71
test(rm): Add a test for multiple -f (#1671) 2020-12-25 14:21:47 +01:00
Diego Magdaleno
8b12686888
ls: On Windows don't display files hidden by NTFS (#1662)
This little check, allows us to hide the files that
shouldn't be shown on the listing on Windows operating
systems.

Just like the "dot" in UNIX based operating systems
Windows uses its own file attributes to determine if a file
is hidden or not.

The lack of support for this option is normally an annoyance
for many users, this commit adds full support for this feature
2020-12-19 17:54:28 +01:00