Michael Debertol
8bebfbb3e6
sort: don't store slices for general numeric sort
...
Gerenal numeric sort works by comparing pre-parsed floating point
numbers. That means that we don't have to store the &str the float was
parsed from.
As a result, memory usage was slightly reduced for general numeric sort.
2021-06-24 18:33:33 +02:00
Michael Debertol
4a956f38b9
sort: separate additional data from the Line struct
...
Data that was previously boxed inside the `Line` struct was moved to
separate vectors. Inside of each `Line` remains only an index that
allows to access that data.
This helps with keeping the `Line` struct small and therefore reduces
memory usage in most cases.
Additionally, this improves performance because one big allocation (the
vectors) are faster than many small ones (many boxes inside of each
`Line`). Those vectors can be reused as well, reducing the amount of
(de-)allocations.
2021-06-23 00:36:05 +02:00
Sylvestre Ledru
e48ff9dd9e
Merge pull request #2441 from siebenHeaven/ls_dangling_symlinks
...
ls: Fix problems dealing with dangling symlinks
2021-06-21 22:34:15 +02:00
Sylvestre Ledru
a982030032
Merge pull request #2386 from youknowone/dircolors-double-scan
...
Prevent double scanning from dircolors
2021-06-21 22:31:24 +02:00
Sylvestre Ledru
97ce44b102
Merge pull request #2407 from hbina/hbina-more-terminal-resize
...
Improvements to `more`.
2021-06-21 22:30:07 +02:00
Anup Mahindre
4b3224dd82
ls: Fix clippy warning
2021-06-21 20:29:22 +05:30
Rémi Lauzier
6aa79440f5
Fix a clippy warning
2021-06-20 21:21:50 -04:00
Anup Mahindre
3b641afadc
ls: Fix issue with Windows and dangling symbolic links
...
- Windows hidden file attribute determination would assume symbolic link
to be valid and would panic
- Check symbolic link's attributes if the link points to non-existing
file
2021-06-20 16:56:25 +05:30
Anup Mahindre
f6cb1324b6
ls: Fix problems dealing with dangling symlinks
...
- For dangling symlinks, errors should only be reported if
dereferencing options were passed and dereferencing was applicable to
the particular symlink
- With -i parameter, report '?' as the inode number for dangling
symlinks
2021-06-20 13:31:45 +05:30
Roy Ivy III
b11e9a057e
docs/spell ~ (uucore) add spelling exceptions
2021-06-19 18:37:13 -05:00
Sylvestre Ledru
115eb5eb52
Merge pull request #2432 from dezgeg/test-bracket-syntax
...
test: Implement [ expr ] syntax
2021-06-19 19:14:20 +02:00
Tuomas Tynkkynen
7b9814c778
test: Implement [ expr ] syntax
...
When invoked via '[' name, last argument must be ']' or we bail out with
syntax error. Then the trailing ']' is simply disregarded and processing
happens like usual.
2021-06-19 18:49:21 +03:00
Sylvestre Ledru
5ba69d4a35
Merge pull request #2412 from syukronrm/du-dereference
...
du: add `--dereference`
2021-06-19 12:05:18 +02:00
Sylvestre Ledru
ac98960f32
Merge pull request #2427 from miDeb/ln/recursive-relative
...
ln: don't return an empty path in `relative_path`
2021-06-19 12:03:59 +02:00
Sylvestre Ledru
65fe9beaad
bring back #[cfg(windows)]
2021-06-19 08:58:33 +02:00
Sylvestre Ledru
e2a00b67ed
Merge pull request #2428 from jhscheer/cut_2424
...
cut: fix `-d=` (#2424 )
2021-06-19 08:46:42 +02:00
Sylvestre Ledru
7739080e6e
Merge pull request #2430 from tertsdiepraam/cp/update-options
...
`cp`: use `options` module and update list op implemented args
2021-06-18 18:50:36 +02:00
Sylvestre Ledru
54ccfdfd9f
Merge pull request #2413 from deantvv/ls-show-control-if-tty
...
ls: set show-control-char if stdout is terminal
2021-06-18 18:26:22 +02:00
Terts Diepraam
f1e043ca1b
Merge pull request #2361 from jhscheer/id_zero_2351
...
id: revamp to pass more of GNU's Testsuite
2021-06-18 18:10:49 +02:00
Terts Diepraam
14520fb64e
cp: remove redundant newline in readme
2021-06-18 18:00:27 +02:00
Terts Diepraam
fdfa44cb5c
Merge branch 'master' into cp/update-options
2021-06-18 17:59:13 +02:00
Terts Diepraam
ab3f2cb672
cp: update list of implemented arguments
2021-06-18 17:56:22 +02:00
Terts Diepraam
cf1a7d0796
cp: use options module
2021-06-18 17:56:04 +02:00
Terts Diepraam
e273cb8e4f
Merge pull request #2426 from miDeb/cp/symlinks
...
cp: improve symlink handling
2021-06-18 17:27:50 +02:00
Jan Scheer
65f47be5ee
cut: fix -d=
( #2424 )
2021-06-18 12:10:40 +02:00
Michael Debertol
3d3af5c8ca
ln: don't return an empty path in relative_path
2021-06-18 11:53:29 +02:00
Michael Debertol
a371c03431
cp: only get the current directory once
2021-06-18 11:48:13 +02:00
Michael Debertol
32526e3048
cp: one more clippy fix
2021-06-18 11:45:04 +02:00
Michael Debertol
315bfd65a3
cp: move symlink check to the right place
2021-06-18 11:44:39 +02:00
Tuomas Tynkkynen
d05964a8cb
test: Implement -k
...
parser.rs already accepts this, finish the implementation.
2021-06-18 00:03:08 +03:00
Michael Debertol
12a1c87cb8
cp: improve symlink handling
2021-06-17 22:26:13 +02:00
Dean Li
c73ba1630e
ls: set show-control-char if stdout is terminal
2021-06-17 19:55:21 +08:00
Terts Diepraam
439b7e0ca5
Merge pull request #2415 from miDeb/touch/date-epoch
...
touch: support @<timestamp> date format
2021-06-17 10:36:03 +02:00
Terts Diepraam
de069190b9
Merge pull request #2417 from miDeb/sort/no-sigpipe-panic
...
sort: avoid sigpipe errors
2021-06-17 10:34:13 +02:00
Syukron Rifail M
bc8415c9db
du: add --dereference
2021-06-17 14:06:41 +07:00
Terts Diepraam
1f4d5827ec
Merge pull request #2416 from jhscheer/fix_getgrouplist
...
uucore/entries: fix `getgrouplist` wrapper to handle a bug in macOS's `getgrouplist` implementation
2021-06-17 00:14:20 +02:00
Michael Debertol
b87387964d
core: mute all BrokenPipe errors
...
On windows the error message does not contain `Broken pipe`, so let's
try to find the error `kind` which should be `BrokenPipe` in all cases.
2021-06-17 00:06:43 +02:00
Michael Debertol
816c55dce4
sort: avoid sigpipe errors
...
By calling `unwrap` we get a panic instead of an abort, and since we
mute sigpipe panics for all utilites, no error message will be printed.
2021-06-17 00:06:39 +02:00
Terts Diepraam
ce6d439a1b
Merge pull request #2381 from miDeb/sort/merge-improvements
...
sort: delete temporary files as soon as possible
2021-06-17 00:00:59 +02:00
Jan Scheer
39aa5312ed
id/tests: skip tests for multiple_user feature if there's not at least coreutils id
version 8.31 in $PATH
2021-06-16 23:52:55 +02:00
Jan Scheer
88367c6fb4
Merge branch 'fix_getgrouplist' into id_zero_2351
2021-06-16 19:20:34 +02:00
Jan Scheer
54cbb69d37
id/tests: fix tests if run on macOS
2021-06-16 19:16:29 +02:00
Michael Debertol
4c5ee1dbd7
tty: correct exit code for write errrors
2021-06-16 17:55:48 +02:00
Michael Debertol
3c271304f5
tty: correct exit code for wrong args
2021-06-16 17:43:38 +02:00
Hanif Bin Ariffin
2a7209116d
Fixed cp --preserve accepting no args
...
Signed-off-by: Hanif Bin Ariffin <hanif.ariffin.4326@gmail.com>
2021-06-16 11:26:52 +08:00
Michael Debertol
84affa2137
touch: support @<timestamp>
date format
...
parse `@<seconds since epoch>` as a valid date.
2021-06-15 22:43:40 +02:00
Jan Scheer
996e1b8539
uucore/entries: fix getgrouplist
wrapper to handle a bug in macOS's
...
`getgrouplist` implementation
* add documentation
2021-06-15 22:13:52 +02:00
Michael Debertol
4bd556d58e
sort: better convey that the return value should be ignored
2021-06-15 19:09:22 +02:00
Michael Debertol
6979b707c0
sort: fix clippy lints
2021-06-15 19:09:22 +02:00
Michael Debertol
047ced2c7f
sort: increase default merge batch size
...
I think we can attempt to open 32 files concurrently on all systems
without risking resource exhaustion.
2021-06-15 19:09:22 +02:00