Commit graph

7798 commits

Author SHA1 Message Date
anastygnome
f5ae859c38 Adds a test for sync.
It is probably too hard to verify that the sync is actually performed,
so we just check that we have a test using the code path, pro forma.

Signed-off-by: anastygnome <noreplygitemail@protonmail.com>
2022-06-05 09:43:59 +02:00
anastygnome
54590c0507 Implement the --sync flag for df. (fixes #3564)
This PR reuses the defined --sync flag for df, which was previously a
no-op, assigns its default value and uses the fact that
get_all_filesystems takes CLI options as a parameter to perform a sync
operation before any fs call.

Fixes #3564

Signed-off-by: anastygnome <noreplygitemail@protonmail.com>
2022-06-05 09:43:59 +02:00
Sylvestre Ledru
69c2871336
Merge pull request #3568 from jfinkels/mktemp-tmpdir-subdirectory
mktemp: combine `--tmpdir` and subdirectory info
2022-06-05 09:33:47 +02:00
Sylvestre Ledru
e2782e2f75
Merge pull request #3583 from cakebaker/ticket_3574
expand: show error if --tabs arg has invalid chars
2022-06-05 09:31:21 +02:00
Sylvestre Ledru
10eee9cfca
Merge pull request #3590 from tertsdiepraam/ls-fix-double-quoting
ls: fix double quoting when color is enabled
2022-06-05 09:30:01 +02:00
Daniel Hofstetter
9651cff6c0 expand: show error if --tabs arg has invalid chars
Fixes #3574
2022-06-03 10:36:42 +02:00
Terts Diepraam
626ed43e05 ls: fix double quoting when color is enabled
When color was enabled the escape_name function was called twice which led to names like `hello world` being displayed as `"'hello world'".
2022-06-03 00:29:56 +02:00
Sylvestre Ledru
68cc9312c8
Merge pull request #3585 from cakebaker/multiple_tabs
expand: allow multiple "tabs" args
2022-06-02 10:08:45 +02:00
Sylvestre Ledru
aeb01c6f52
Merge pull request #3563 from sylvestre/hard-to-sym
ln: Implement -L -P to make tests/ln/hard-to-sym.sh work
2022-06-02 08:19:17 +02:00
Jeffrey Finkelstein
a9e008f230 mktemp: add test for combining --tmpdir, subdir
Add a unit test for combining the directory given in `--tmpdir` with
any subdirectory structure appearing in the prefix of the template
string. For example,

    $ mktemp --tmpdir=a b/cXXX
    a/b/cNqJ

This behavior is currently working, but a unit test was missing.
2022-06-01 18:22:17 -04:00
Sylvestre Ledru
08fed8fb7b
Merge pull request #3541 from cakebaker/split_set_names_for_arg_values
split: set names for arg values
2022-06-01 23:12:36 +02:00
Sylvestre Ledru
36e5b60617
Merge pull request #3566 from cakebaker/print_ls_colors
dircolors: implement --print-ls-colors
2022-06-01 23:11:57 +02:00
Sylvestre Ledru
06c2aea1b4 ln: Implement -L -P to make tests/ln/hard-to-sym.sh work 2022-06-01 23:03:50 +02:00
Daniel Hofstetter
864c666467 expand: allow multiple "tabs" args 2022-06-01 16:18:57 +02:00
Sylvestre Ledru
2ed64fc9a1
Merge pull request #3573 from jfinkels/mktemp-simpler-prefix-suffix
mktemp: simplify file path parameter logic
2022-06-01 08:38:31 +01:00
Sylvestre Ledru
8f90767852
Merge pull request #3582 from cakebaker/ticket_3580
df: trim size header in tests
2022-06-01 08:37:30 +01:00
Jeffrey Finkelstein
43e9fb73b1 mktemp: simplify file path parameter logic
Simplify the logic of computing the file path parameters (the
directory, prefix, suffix, and number of random characters) for the
temporary file created by `mktemp`. This commits adds an `Options`
struct as a layer of indirection between the application logic and
`clap`, and a `Params` struct whose associated function is responsible
for determining the file path parameters from the `Options`. This is
an improvement because the previous code had some logic for
determining file path parameters in one place and some in another
place.
2022-05-31 19:35:01 -04:00
Daniel Hofstetter
113c1855fd df: trim size header in tests
Fixes #3580
2022-05-31 10:34:20 +02:00
Sylvestre Ledru
e276e652dc
Merge pull request #3579 from jfinkels/df-total-label-target-column
df: show "total" label in correct column
2022-05-31 07:42:06 +01:00
Sylvestre Ledru
e3b8ad942a
Merge pull request #3576 from sylvestre/users
bump the users version
2022-05-30 18:12:56 +01:00
Terts Diepraam
a240b1cef3
Merge pull request #3578 from jfinkels/mktemp-usage-error-status-1
mktemp: exit with status 1 on usage errors
2022-05-30 18:34:27 +02:00
Jeffrey Finkelstein
d7b528f60b df: show "total" label in correct column
Show the "total" label in the "source" column or in the "target"
column if the "source" column is not visible.

Before this commit,

    $ df --total --output=target .
    Mounted on
    /
    -

After this commit,

    $ df --total --output=target .
    Mounted on
    /
    total
2022-05-30 11:22:07 -04:00
Terts Diepraam
2516610579
Merge pull request #3577 from cakebaker/remove_empty_line_from_error_message
expand: remove empty line from error message
2022-05-30 16:59:09 +02:00
Jeffrey Finkelstein
dfc1c8a2dd mktemp: exit with status 1 on usage errors 2022-05-30 09:30:47 -04:00
Daniel Hofstetter
df2507bdf2 expand: remove empty line from error message 2022-05-30 14:31:39 +02:00
Sylvestre Ledru
3c3020ef99 bump the users version 2022-05-30 14:23:17 +02:00
Daniel Hofstetter
6d82523a99 dircolors: implement --print-ls-colors 2022-05-30 09:11:27 +02:00
Daniel Hofstetter
2261051239 split: set names for arg values 2022-05-30 09:10:18 +02:00
Terts Diepraam
7861cc9dca
Merge pull request #3569 from cakebaker/overridable_args
dircolors: make -b & -c args overridable
2022-05-27 13:08:25 +02:00
Terts Diepraam
c4b47b4ad1
Merge pull request #3570 from cakebaker/dirname_missing_newline
dirname: add missing "\n\" to usage message
2022-05-27 13:07:26 +02:00
Daniel Hofstetter
e750a5a06a dirname: add missing "\n\" to usage message 2022-05-27 10:52:51 +02:00
Daniel Hofstetter
598fdc4430 dircolors: make -b & -c args overridable 2022-05-27 10:36:49 +02:00
Terts Diepraam
1d18eabf0b
Merge pull request #3567 from cakebaker/tail_typo
tail: fix typo
2022-05-26 19:21:03 +02:00
Daniel Hofstetter
3a0aaabd27 tail: fix typo 2022-05-26 15:17:20 +02:00
Sylvestre Ledru
172f5c4182
Merge pull request #3504 from cakebaker/read_blocksize_from_env_vars
df: read block size from env vars
2022-05-25 16:41:41 +02:00
Sylvestre Ledru
fa577603c2
Merge pull request #3471 from 353fc443/mktemp-set-dir-mode
mktemp: change directory permission after creation
2022-05-25 14:56:45 +02:00
Terts Diepraam
ab736926ba
Merge pull request #3562 from sylvestre/consistency
be consistent in the rustflag declaration
2022-05-25 13:15:09 +02:00
Sylvestre Ledru
549c642519
Merge pull request #3559 from cakebaker/update_dircolors_database
dircolors: update internal db
2022-05-25 13:10:28 +02:00
Sylvestre Ledru
511ca1dcd8
Merge pull request #3561 from cakebaker/missing_test
dircolors: test for correct error for -bp and -cp
2022-05-25 08:47:00 +02:00
Sylvestre Ledru
1867b65816
Merge pull request #3554 from cakebaker/ticket_3422
df: fix rounding behavior in humanreadable mode
2022-05-25 08:46:32 +02:00
Sylvestre Ledru
c810a5e051 be consistent in the rustflag declaration 2022-05-24 19:05:27 +02:00
Daniel Hofstetter
74a5938acf dircolors: test for correct error for -bp and -cp 2022-05-24 15:32:01 +02:00
Daniel Hofstetter
ba746250fb dircolors: update internal db 2022-05-24 13:56:15 +02:00
Daniel Hofstetter
c90a1c759a df: fix rounding behavior in humanreadable mode
Fixes #3422
2022-05-23 15:21:51 +02:00
Daniel Hofstetter
ea284ce55e df: read block size from env vars 2022-05-23 09:24:07 +02:00
Sylvestre Ledru
c818ca0039
Merge pull request #3551 from jfinkels/mktemp-too-few-xs-suffix
mktemp: include suffix in error message
2022-05-23 08:38:15 +02:00
Terts Diepraam
eae07adfb1
Version 0.0.14 (#3553)
Version 0.0.14
2022-05-22 19:57:19 +02:00
Sylvestre Ledru
887f49ce2d
Merge pull request #3550 from thomasqueirozb/ls_gds
ls: implement --group-directories-first
2022-05-22 09:50:04 +02:00
Jeffrey Finkelstein
35fb4e6ea1 mktemp: include suffix in error message
Include the suffix in the error message produced by `mktemp` when
there are too few Xs in the template. Before this commit,

    $ mktemp --suffix=X aXX
    mktemp: too few X's in template 'aXX'

After this commit,

    $ mktemp --suffix=X aXX
    mktemp: too few X's in template 'aXXX'

This matches the behavior of GNU `mktemp`.
2022-05-21 21:59:06 -04:00
Thomas Queiroz
0b24839a1e
tests/ls: add --group-directories-first test 2022-05-21 18:57:53 -03:00