Commit graph

2458 commits

Author SHA1 Message Date
Roy Ivy III
98aff50d4b docs/tail ~ fix markdownlint complaints 2021-05-31 08:23:58 -05:00
Roy Ivy III
ceda51dd5c docs/ls ~ fix spelling + whitespace 2021-05-31 08:23:58 -05:00
Roy Ivy III
1ca44fbbc3 docs/factor ~ fix markdownlint complaints 2021-05-31 08:23:58 -05:00
Roy Ivy III
b418f19c2d docs/date ~ convert usage text document to a markdown text segment 2021-05-31 08:23:57 -05:00
Roy Ivy III
3fb8a37ace refactor ~ (bin/coreutils) polish spelling (comments, names, and exceptions) 2021-05-31 08:23:57 -05:00
Roy Ivy III
5c9b474cc8 refactor/whoami ~ polish spelling (comments, names, and exceptions) 2021-05-31 08:23:57 -05:00
Roy Ivy III
dff33a0edb refactor/wc ~ polish spelling (comments, names, and exceptions) 2021-05-31 08:23:57 -05:00
Roy Ivy III
3d42454ebc refactor/users ~ polish spelling (comments, names, and exceptions) 2021-05-31 08:23:57 -05:00
Roy Ivy III
40e136d092 refactor/uucore ~ polish spelling (comments, names, and exceptions) 2021-05-31 08:23:57 -05:00
Roy Ivy III
954b3436d9 refactor/truncate ~ polish spelling (comments, names, and exceptions) 2021-05-31 08:23:57 -05:00
Roy Ivy III
f6a079a77f refactor/timeout ~ polish spelling (comments, names, and exceptions) 2021-05-31 08:23:57 -05:00
Roy Ivy III
b1a2f6e044 refactor/tee ~ polish spelling (comments, names, and exceptions) 2021-05-31 08:23:57 -05:00
Roy Ivy III
879ac263bd refactor/test ~ polish spelling (comments, names, and exceptions) 2021-05-31 08:23:57 -05:00
Roy Ivy III
8e824742a1 refactor/stat ~ polish spelling (comments, names, and exceptions) 2021-05-31 08:23:57 -05:00
Roy Ivy III
451110bba0 refactor/split ~ polish spelling (comments, names, and exceptions) 2021-05-31 08:23:57 -05:00
Roy Ivy III
00a2e17c80 refactor/splice ~ polish spelling (comments, names, and exceptions) 2021-05-31 08:23:57 -05:00
Roy Ivy III
f8e04c562b refactor/sort ~ polish spelling (comments, names, and exceptions) 2021-05-31 08:23:57 -05:00
Roy Ivy III
a15f8af99f refactor/shred ~ polish spelling (comments, names, and exceptions) 2021-05-31 08:23:57 -05:00
Roy Ivy III
13561cb5ae refactor/ptx ~ polish spelling (comments, names, and exceptions) 2021-05-31 08:23:56 -05:00
Roy Ivy III
324605c78c refactor/printf ~ polish spelling (comments, names, and exceptions) 2021-05-31 08:23:56 -05:00
Roy Ivy III
aa385cf23c refactor/od ~ polish spelling (comments, names, and exceptions) 2021-05-31 08:23:56 -05:00
Roy Ivy III
5079972ba6 refactor/nl ~ polish spelling (comments, names, and exceptions) 2021-05-31 08:23:56 -05:00
Roy Ivy III
00c02505a1 refactor/more ~ polish spelling (comments, names, and exceptions) 2021-05-31 08:23:56 -05:00
Roy Ivy III
57e342d2b2 refactor/mktemp ~ polish spelling (comments, names, and exceptions) 2021-05-31 08:11:32 -05:00
Roy Ivy III
e3784eff47 refactor/mknod ~ polish spelling (comments, names, and exceptions) 2021-05-31 08:11:32 -05:00
Roy Ivy III
5942ba05ef refactor/ls ~ polish spelling (comments, names, and exceptions) 2021-05-31 08:11:32 -05:00
Roy Ivy III
96faa4efb6 refactor/ln ~ polish spelling (comments, names, and exceptions) 2021-05-31 08:11:32 -05:00
Roy Ivy III
785343db7f refactor/head ~ polish spelling (comments, names, and exceptions) 2021-05-31 08:11:32 -05:00
Roy Ivy III
a481e8230b refactor/hashsum ~ polish spelling (comments, names, and exceptions) 2021-05-31 08:11:32 -05:00
Roy Ivy III
1a37d502d1 refactor/factor ~ polish spelling (comments, names, and exceptions) 2021-05-31 08:11:32 -05:00
Roy Ivy III
ba7939e142 refactor/env ~ polish spelling (comments, names, and exceptions) 2021-05-31 08:11:32 -05:00
Roy Ivy III
6e1bd6027a refactor/du ~ polish spelling (comments, names, and exceptions) 2021-05-31 08:11:32 -05:00
Roy Ivy III
dfe594e918 refactor/date ~ polish spelling (comments, names, and exceptions) 2021-05-31 08:11:32 -05:00
Roy Ivy III
1b1086146b refactor/cp ~ polish spelling (comments, names, and exceptions) 2021-05-31 08:11:32 -05:00
Roy Ivy III
fc5451b5e7 refactor/cksum ~ polish spelling (comments, names, and exceptions) 2021-05-31 08:11:32 -05:00
Roy Ivy III
43f5c13a7f refactor/chmod ~ polish spelling (comments, names, and exceptions) 2021-05-31 08:11:31 -05:00
Roy Ivy III
48e509546a refactor/uucore ~ polish spelling (comments, names, and exceptions) 2021-05-31 08:11:31 -05:00
Roy Ivy III
9c0c8eb59f change ~ remove 'main.rs' spell-checker exceptions 2021-05-31 08:11:31 -05:00
Sylvestre Ledru
8c5dcd0765
Merge branch 'master' into implement-more 2021-05-31 10:17:15 +02:00
Anup Mahindre
898d325aea ls: Fix minor output mismatch
When a single directory is passed to ls in recursive mode, uutils ls
won't print the directory name
======================
GNU ls:
z:
======================
======================
uutils ls:
======================

This commit fixes this minor inconsistency and adds corresponding test.
2021-05-30 18:00:52 +05:30
Sylvestre Ledru
3913731222
Revert "rmdir: match GNU error output" 2021-05-30 09:55:02 +02:00
Sylvestre Ledru
83bb8795bd
add a comment to explain the why 2021-05-30 09:16:46 +02:00
Dean Li
5b417e251d
rmdir: match GNU error output
Related to #2258
2021-05-30 10:45:54 +08:00
Michael Debertol
dc63133f14
sort: correctly inherit global flags for keys (#2302)
Closes #2254. We should only inherit global settings for keys when there
are absolutely no options attached to the key.

The default key (matching the whole line) is implicitly added only if no
keys are supplied.

Improved some error messages by including more context.
2021-05-29 23:25:56 +02:00
Michael Debertol
d821719c67
expr: support arbitrary precision integers (#2271)
* expr: support arbitrary precision integers

Instead of i64s we now use BigInts for integer operations. This means
that no result or input can be out of range.
The representation of integer flags was changed from i64 to u8 to make
their intention clearer.

* expr: allow big numbers as arguments as well

Also adds some tests

* expr: use num-traits to check bigints for 0 and 1

* expr: remove obsolete refs

match ergonomics made these avoidable.

* formatting

Co-authored-by: Sylvestre Ledru <sylvestre@debian.org>
2021-05-29 23:25:23 +02:00
Jeffrey Finkelstein
0999b00ff9 truncate: re-organize into one func for each mode
Reorganize the code in `truncate.rs` into three distinct functions
representing the three modes of operation of the `truncate` program. The
three modes are

- `truncate -r RFILE FILE`, which sets the length of `FILE` to match the
  length of `RFILE`,
- `truncate -r RFILE -s NUM FILE`, which sets the length of `FILE`
  relative to the given `RFILE`,
- `truncate -s NUM FILE`, which sets the length of `FILE` either
  absolutely or relative to its curent length.

This organization of the code makes it more concise and easier to
follow.
2021-05-29 15:11:27 +02:00
Jeffrey Finkelstein
5129114ddc truncate: create TruncateMode::to_size() method
Create a method that computes the final target size in bytes for the
file to truncate, given the reference file size and the parameter to the
`TruncateMode`.
2021-05-29 15:11:27 +02:00
Jeffrey Finkelstein
005bc259da truncate: add parse_mode_and_size() helper func
Add a helper function to contain the code for parsing the size and the
modifier symbol, if any. This commit also changes the `TruncateMode`
enum so that the parameter for each "mode" is stored along with the
enumeration value. This is because the parameter has a different meaning
in each mode.
2021-05-29 15:11:27 +02:00
Jeffrey Finkelstein
b898e54d7a truncate: remove read permissions from OpenOptions
Remove "read" permissions from the `OpenOptions` when opening a new file
just to truncate it. We will never read from the file, only write to
it. (Specifically, we will only call `File::set_len()`.)
2021-05-29 15:11:27 +02:00
Gilad Naaman
17b0939dee Moved factor to use clap
Issue: https://github.com/uutils/coreutils/issues/2121
2021-05-29 15:11:27 +02:00