Ben Wiederhake
714b4ff589
ls: fix exit code for --time-style when used
2024-04-01 22:57:18 +02:00
Ben Wiederhake
4a1bd78f48
ls: compute correct exit code on error
...
Note in particular that this seems to be the only tool where invalid
stringly-enum values cause a different exit code than invalid arguments.
2024-04-01 22:57:18 +02:00
Ulrich Hornung
066032b1d3
apply different reference sizes for f2fs (android) case
2024-03-23 16:54:19 +01:00
Daniel Hofstetter
d2a75457f6
Fix errors reported by new version of cspell
2024-02-05 09:12:52 +01:00
Sylvestre Ledru
e01d5f75f7
ls: if acl are used, show the + in the perms ( #5816 )
...
* ls: if acl are used, show the + in the perms
Tested by tests/mkdir/p-acl.sh
* CICD.yml: fix small formatting issue
---------
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2024-01-14 15:57:22 +01:00
Dorian Péron
4372908e84
fix: cargo fmt + fix spelling mistake
2024-01-05 13:55:47 +01:00
Dorian Péron
c58575edaa
tests/ls: Add tests to ensure env var is used as a last resort
2024-01-05 02:10:33 +01:00
Daniel Hofstetter
9bb725cefc
clippy: fix warnings introduced by Rust 1.75
2023-12-28 18:17:06 +01:00
Daniel Hofstetter
270ac90cc1
ls: set correct block size when -k is provided
2023-12-24 16:35:49 +01:00
Daniel Hofstetter
a8a5931cae
ls: introduce 2nd blocksize & fix todos in tests
2023-12-22 11:42:01 +01:00
Daniel Hofstetter
d8709d2839
ls: recognize BLOCKSIZE env var
2023-12-19 15:00:06 +01:00
Daniel Hofstetter
a5606613bd
ls: ignore invalid block size from env vars
2023-12-19 10:02:34 +01:00
Daniel Hofstetter
917c6a4743
ls: support hyperlinks for dir names
2023-12-18 15:26:09 +01:00
Sylvestre Ledru
0fa074fcba
Merge pull request #5629 from cakebaker/ls_hyperlink_encode
...
ls: encode path when using --hyperlink
2023-12-18 13:38:08 +01:00
Sylvestre Ledru
f6d3f9afbf
ls: manages the COLOR and COLORTERM variables
...
Should fix GNU tests/ls/color-term.sh
2023-12-16 09:50:37 +01:00
Daniel Hofstetter
42558344f1
ls: enable "args override self"
2023-12-12 14:23:51 +01:00
Daniel Hofstetter
89cb4acb99
ls: encode path when using --hyperlink
2023-12-12 10:03:55 +01:00
Daniel Hofstetter
6711dd5694
ls: make --block-size and --human-readable/--si
...
override each other
2023-12-11 16:38:55 +01:00
Sylvestre Ledru
4442b35370
Merge pull request #5626 from cakebaker/ls_invalid_block_size
...
ls: handle invalid block size as GNU does
2023-12-11 07:49:38 +01:00
Dorian Péron
673093f842
ls: set default quoting style to literal when not TTY ( #5553 )
...
* ls: set default quoting style to literal if output is not TTY
* tests/ls: Fix quoting tests that now run with Literal as default
* ls: Fix formatting/linting/spelling issues
* tests/ls: Fix windows escaped tests
2023-12-10 16:07:41 +01:00
Sylvestre Ledru
1d4c919b97
Add mdir to the spell ignore
2023-12-09 16:33:19 +01:00
Sylvestre Ledru
e071286eb0
address review comments
2023-12-09 13:10:41 +01:00
Sylvestre Ledru
268b180416
ls colors: create a stylemanager to carry the previous style to know if we need to reset or not
2023-12-09 13:10:38 +01:00
Sylvestre Ledru
b676216f9b
ls: use the gnu_legacy feature from lscolors
2023-12-09 13:05:12 +01:00
Daniel Hofstetter
e9dc2930ee
ls: handle invalid block size as GNU does
2023-12-08 19:19:51 +01:00
Daniel Hofstetter
5a32ab8004
ls: implement --hyperlink
2023-12-07 08:14:25 +01:00
Daniel Hofstetter
51fc2d7564
ls: ignore value of POSIXLY_CORRECT
2023-12-03 16:01:19 +01:00
Daniel Hofstetter
0ec6802459
ls: fix padding of size column when using -l
2023-11-30 16:19:27 +01:00
Daniel Hofstetter
2f9fcf73fa
clippy: fix warnings introduced by Rust 1.74
2023-11-16 16:21:28 +01:00
Terts Diepraam
96d0830952
Merge pull request #5446 from cakebaker/ls_try_get_matches_from
...
ls: use try_get_matches_from instead of get_matches_from
2023-10-25 11:25:40 +02:00
Daniel Hofstetter
6f84e56e28
ls: return exit code 2 for invalid time-style
2023-10-24 16:33:04 +02:00
Daniel Hofstetter
fd18d2686f
ls: return exit code 2 for -l --dired --zero
2023-10-24 14:48:24 +02:00
Sylvestre Ledru
f971a69d69
ls --dired -R: fix the positions ( #5341 )
...
* move get_offset_from_previous_line into a specific function
* dired: improve the -R support
* dired: fix the display with subdir
* ls --dired -R: fix the positions
* ls --dired -R: verify also the SUBDIRED coordinate
* ls --dired -R: add a long file name and fix a windows test
* dired: always put dired first in the args + minor fixes
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
* ls: add cognitive_complexity to silent a warning
---------
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2023-10-19 14:17:34 +02:00
Sylvestre Ledru
41188a915e
rename the test
...
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2023-10-13 11:35:45 +02:00
Sylvestre Ledru
94972d45c7
ls: Document a bit tests/ls/stat-dtype.sh
2023-10-12 23:37:07 +02:00
Sylvestre Ledru
7337cd5169
ls -R1: add a test to replicate GNU's recursive.sh
2023-10-01 17:03:57 +02:00
Daniel Hofstetter
0794d1338d
ls: fix test which fails if /tmp uses tmpfs
2023-09-22 10:43:23 +02:00
Sylvestre Ledru
9b4d2c6bc4
ls: implement --dired
...
* Support ls --dired
* stat-failed.sh: update of the test - we have a small difference
* ls --dired: address some of the comments
* fix warnings
* use unwrap()
* Improve test
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
* Simplify test
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
* Remove a word from the spell ignore
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
* remove duplication of the spell ignore
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
* rustfmt
---------
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2023-09-20 08:17:46 +02:00
Sylvestre Ledru
37ee889003
ls -l: show an error when symlink not readable
...
switching to match and handle the error
Will help with tests/ls/stat-failed.sh
2023-09-15 22:34:17 +02:00
Sylvestre Ledru
bfca6bf70f
Add license headers on all files
2023-08-21 10:49:27 +02:00
Rayhan Faizel
9e26534239
tests/ls: Test overflowing decimal and octal values of --width
2023-07-12 23:24:26 +05:30
John Shin
4db5a60667
ls: add back version cmp test
2023-07-09 15:30:56 -07:00
Daniel Hofstetter
0b37b63ea3
Merge pull request #5055 from yt2b/ls_literal_option
...
ls: --l should output the same as --literal
2023-07-09 14:07:24 +02:00
yt2b
cf6f7856e4
ls: fix --l option
2023-07-08 10:43:20 +09:00
John Shin
b42a5b8741
ls: update test result for version compare
2023-07-05 10:05:52 +02:00
Guillaume Ranquet
80c7ed9732
ls: force fetching metadata when called with -L -Z
...
The metadata are not used but it permits to check the symlink is valid.
We then return 1 on invalid symlinks when ls is invoked with ls -L -Z
Signed-off-by: Guillaume Ranquet <granquet@baylibre.com>
2023-06-26 14:46:56 +02:00
Daniel Hofstetter
c26396087f
ls: add words to spell-checker:ignore
2023-06-06 17:44:04 +02:00
Rayhan Faizel
21f1a119c3
tests/ls: Implement tests for sort by width option
2023-06-06 20:56:42 +05:30
Sylvestre Ledru
3e7594632b
ls: when facing an invalid utf-8, don't panic
...
Fails with
```
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "invalid-\xE0-"', src/uu/ls/src/ls.rs:1932:53
```
2023-05-14 22:11:44 +02:00
Daniel Hofstetter
98fa941250
Merge pull request #4759 from sylvestre/clippy4
...
fix some clippy warnings in tests
2023-05-12 07:15:44 +02:00