Commit graph

6815 commits

Author SHA1 Message Date
Sylvestre Ledru
c57ea0a938
Merge pull request #2964 from biomunky/2940
fix: update itertools 0.8.0 -> 0.10.0
2022-01-30 16:40:39 +01:00
Daniel Eades
ba45fe312a use 'Self' and derive 'Default' where possible 2022-01-30 15:08:26 +01:00
Daniel Eades
2f85610cc3 remove explicit iter loops 2022-01-30 15:08:26 +01:00
Daniel Eades
cf24620d3d remove 'let and return' 2022-01-30 15:08:26 +01:00
Daniel Eades
784f2e2ea1 use semicolons if nothing returned 2022-01-30 15:08:26 +01:00
Daniel Eades
a2d5f06be4 remove needless pass by value 2022-01-30 15:08:26 +01:00
Zachary Dremann
f9f7e7d490 Avoid unneeded Strings in building phf map 2022-01-30 08:49:34 -05:00
Terts Diepraam
6cfed3bd50 make: no longer create INSTALLDIR_MAN
Creating this is no longer necessary and might result in a permission error, which causes installation errors
2022-01-30 14:47:29 +01:00
Zachary Dremann
ad847fa645 Add codegen to the jargon wordlist 2022-01-30 08:40:29 -05:00
Daniel Eades
f4c6ea0ee8 remove unnecessary 'to_owned' 2022-01-30 14:01:21 +01:00
Daniel Eades
8bb6c4effa use pointer args 2022-01-30 14:01:21 +01:00
Daniel Eades
191e29f951 simplify some boolean operations 2022-01-30 14:01:21 +01:00
Daniel Eades
f2074140ec use 'char' instead of 'str' for single character patterns 2022-01-30 14:01:21 +01:00
Daniel Eades
5af66753af remove needless borrows 2022-01-30 14:01:21 +01:00
Sylvestre Ledru
2f6f6867c5
Merge branch 'main' into 2940 2022-01-30 13:33:35 +01:00
Zachary Dremann
bb41f4ffe5 Use a PHF map for util_map()
Rather than building a HashMap at compile time, use the phf (and phf_codegen) crate to build the map
at compile time in build.rs
2022-01-30 06:58:33 -05:00
Sylvestre Ledru
57dc11e586
Merge pull request #2871 from jfinkels/split-settings-methods
split: add a method to convert ArgMatches to Settings
2022-01-30 11:31:58 +01:00
Sylvestre Ledru
81b2a240e6
Merge pull request #2960 from water-ghosts/fix-cp-a-panic
Don't panic when calling cp -a with a nonexistent file
2022-01-30 11:30:56 +01:00
Sylvestre Ledru
bfa2d8b7da
Merge pull request #2875 from kimono-koans/ls_bad_fd_2
ls: Fix display of bad file descriptor errors
2022-01-30 09:59:58 +01:00
Sylvestre Ledru
7c1abdb7d9
Merge pull request #2866 from jfinkels/split-number-2
split: implement -n option
2022-01-30 09:58:04 +01:00
Sylvestre Ledru
b8b642101f
Merge pull request #2898 from jfinkels/tail-lines-zero-terminated
tail: support zero-terminated lines in streams
2022-01-30 09:44:04 +01:00
Eli Youngs
71c889116e Fix formatting and unused variable checks 2022-01-30 00:33:06 -08:00
Eli Youngs
680e9081fe Don't panic when calling cp -a with a nonexistent file 2022-01-29 22:59:53 -08:00
Dan Klose
bb7f37e8b4 fix: update itertools 0.8.0 -> 0.10.0
Targets https://github.com/uutils/coreutils/issues/2940

* since versions were mxing versions of x.y and x.y.z I changed all to x.y.z
* minor whitespace formatting
2022-01-29 22:35:51 +00:00
Terts Diepraam
5afc3354f2
Merge pull request #2956 from water-ghosts/fix-documentation-link
README: Update link for Developer Documentation
2022-01-29 22:14:51 +01:00
Eli Youngs
23ec195962 Fix 404 link 2022-01-29 12:55:07 -08:00
Sylvestre Ledru
5dd7d13cbd
Merge pull request #2948 from tertsdiepraam/new-macros
all: change macros
2022-01-29 18:51:32 +01:00
Terts Diepraam
eb82015b23 all: change macros
- Change the main! proc_macro to a bin! macro_rules macro.
- Reexport uucore_procs from uucore
- Make utils to not import uucore_procs directly
- Remove the `syn` dependency and don't parse proc_macro input (hopefully for faster compile times)
2022-01-29 15:26:32 +01:00
Sylvestre Ledru
1dcd3b2c24
Merge pull request #2943 from jfinkels/truncate-no-such-dir
truncate: better error msg when dir does not exist
2022-01-29 12:25:38 +01:00
Sylvestre Ledru
52ab6325a0
Merge pull request #2881 from jtracey/join-null-field-sep
join: add support for `-t '\0'`
2022-01-29 10:55:04 +01:00
Sylvestre Ledru
196a7a921c
Merge pull request #2877 from jfinkels/head-use-uucore-error-handling
head: use uucore error handling instead of custom
2022-01-29 10:53:48 +01:00
Sylvestre Ledru
24744ca42b
Merge pull request #2911 from jfinkels/dd-seek-stdout
dd: support seek=N when destination is stdout
2022-01-29 10:47:17 +01:00
Sylvestre Ledru
57ee6b5302
Merge branch 'main' into truncate-no-such-dir 2022-01-29 09:58:17 +01:00
Sylvestre Ledru
cbc7da3d7d
Merge pull request #2936 from tertsdiepraam/clap-infer-long-args
all: enable infer long arguments in clap
2022-01-29 09:57:15 +01:00
Sylvestre Ledru
bd44c59043
Merge pull request #2945 from jfinkels/truncate-reduce-underflow
truncate: prevent underflow when reducing size
2022-01-29 09:55:29 +01:00
Sylvestre Ledru
ef91e6abc3
Merge pull request #2942 from tertsdiepraam/readme-docs
README: reference the docs & rewrite why section
2022-01-29 09:48:11 +01:00
Sylvestre Ledru
52b7a725ed
Merge pull request #2938 from sylvestre/selinux-dep
selinux: add consistency in the dep declaration
2022-01-29 09:46:16 +01:00
Jeffrey Finkelstein
0454d3b243 truncate: prevent underflow when reducing size
Prevent usize underflow when reducing the size of a file by more than
its current size. For example, if `f` is a file with 3 bytes, then

    truncate -s-5 f

will now set the size of the file to 0 instead of causing a panic.
2022-01-28 22:44:07 -05:00
Jeffrey Finkelstein
c780c96e17 truncate: better error msg when dir does not exist
Improve the error message that gets printed when a directory does not
exist. After this commit, the error message is

    truncate: cannot open '{file}' for writing: No such file or directory

where `{file}` is the name of a file in a directory that does not
exist.
2022-01-28 21:21:37 -05:00
Terts Diepraam
2412e4cbf7 add some tests for Clap's InferLongArgs setting 2022-01-29 02:06:32 +01:00
Terts Diepraam
5f1933a89f df: no longer override help 2022-01-29 02:06:32 +01:00
Terts Diepraam
9c8e865b55 all: enable infer long arguments in clap 2022-01-29 02:06:29 +01:00
Terts Diepraam
50964c0ee7 README: restructuring 2022-01-29 01:42:18 +01:00
Terts Diepraam
0063c5e11a README: update intoduction and why? section 2022-01-29 01:42:03 +01:00
Sylvestre Ledru
96584027e5 selinux: add consistency in the dep declaration 2022-01-29 01:31:17 +01:00
Sylvestre Ledru
f1d72018d7
Merge pull request #2923 from jfinkels/seq-error-zero-increment-value
seq: correct error message for zero increment
2022-01-29 01:25:57 +01:00
Sylvestre Ledru
c702154a84
Merge pull request #2934 from jfinkels/truncate-division-by-zero
truncate: add a division by zero error
2022-01-29 01:25:10 +01:00
Terts Diepraam
0f76ca0ffa README: add links to documentation 2022-01-29 01:19:15 +01:00
Sylvestre Ledru
fed5ca4ba9
Merge pull request #2935 from tertsdiepraam/wc-unusual-files
wc: fix counting files from pseudo-filesystem
2022-01-29 01:09:02 +01:00
Sylvestre Ledru
68b6a3e5d8
Merge pull request #2937 from sylvestre/doc-ci
Fix the doc warnings and add a check to make sure we don't regress
2022-01-29 01:08:10 +01:00