Sylvestre Ledru
882cd527ff
Merge pull request #3704 from Sciencentistguy/once_cell
...
Replace lazy_static with once_cell
2022-07-13 16:15:47 +02:00
Jamie Quigley
1a270361c0
Replace lazy_static with once_cell
2022-07-12 14:08:30 +01:00
Niyaz Nigmatullin
da5808d4ac
ls: add already listed message ( #3707 )
...
* ls: handle looping symlinks infinite printing
* ls: better coloring and printing symlinks when dereferenced
* tests/ls: add dereferencing and symlink loop tests
* ls: reformat changed using rustfmt
* ls: follow clippy advice for cleaner code
* uucore/fs: fix FileInformation to open directory handles in Windows as
well
2022-07-11 17:18:58 +02:00
anastygnome
0ef6732632
Add a test like the one in the issue.
...
Signed-off-by: anastygnome <noreplygitemail@protonmail.com>
2022-06-13 11:29:13 +02:00
Joerg Jaspert
fd1e0e6dd7
Correctly parse numbers starting with 0 as octal
2022-06-12 12:55:33 +02:00
Joerg Jaspert
c513692bae
Test for (against) octal-looking width
2022-06-11 22:43:46 +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
Thomas Queiroz
0b24839a1e
tests/ls: add --group-directories-first test
2022-05-21 18:57:53 -03:00
Thomas Queiroz
c4606266e4
tests/ls: update version sort test
2022-05-21 18:50:26 -03:00
Jeffrey Finkelstein
896bbec760
all: clippy fixes
2022-05-13 22:47:56 -04:00
Justin Tracey
2a0d58d060
get android builds to compile and pass tests
2022-04-20 08:44:49 +02:00
Sylvestre Ledru
d0aa9a9927
Merge pull request #3343 from uutils/dependabot/cargo/lscolors-0.9.0
...
build(deps): bump lscolors from 0.7.1 to 0.9.0
2022-04-09 09:29:25 +02:00
Terts Diepraam
54b2fe700b
fix regressed test due to lscolors update
2022-04-07 11:05:20 +02:00
Terts Diepraam
18369dc0be
all: use array intoiterator
2022-04-05 10:39:31 +02:00
Sylvestre Ledru
c79d146dde
ls: add support for --quoting-style=shell-escape b --color=auto
2022-03-27 10:50:00 +02:00
Sylvestre Ledru
bbee22bb1c
ls: Add missing quote with --quoting-style=shell-escape
...
Should fix GNU: tests/ls/symlink-quote.sh
2022-03-27 10:50:00 +02:00
Sylvestre Ledru
187bddb6af
ls: support multiple -a or -A
2022-03-21 13:32:23 +01:00
Sylvestre Ledru
af8726af43
ls: when -aA are provided, the order matters
2022-03-20 23:23:17 +01:00
kimono-koans
fa6af85b8e
ls: Fix display of inodes and add allocation size feature ( #3052 )
2022-03-15 16:27:43 +01:00
Terts Diepraam
722c5d268f
fix Rust 1.59 clippy lints
2022-02-25 09:39:48 +01:00
Sylvestre Ledru
67cee26abe
Merge pull request #3003 from tertsdiepraam/ls-fix-another-flaky-test
...
`ls`: fix flaky test `test_ls_io_errors`
2022-02-15 20:11:48 +01:00
Abhishek C Sharma
3f6fe7f388
ls: add new optional arguments to --classify flag ( #3041 )
...
* ls: add new optional arguments to --classify flag
The --classify flag in ls now takes an option when argument
that may have the values always, auto and none.
Modified clap argument to allow an optional parameter and
changed the classify flag value parsing logic to account for
this change.
* ls: add test for indicator-style, ind and classify with value none
* ls: require option paramter to --classify to use a = to specify flag value
* ls: account for all the undocumented possible values for the --classify flag
Added the other values for the --classify flag along with modifications to tests.
Also documented the inconsistency between GNU coreutils because we accept the
flag value even for the short version of the flag.
2022-02-10 21:35:20 +01:00
Hanif Bin Ariffin
560cd74a63
test_ls: Do not rely on the system time of metadata'access time
...
Signed-off-by: Hanif Bin Ariffin <hanif.ariffin.43262@gmail.com>
2022-02-02 12:49:40 +08:00
Terts Diepraam
08f1199b08
ls: fix flaky test test_ls_io_errors
2022-02-01 10:55:15 +01:00
Sylvestre Ledru
829e4fcb2c
Merge pull request #2970 from tertsdiepraam/ls-fix-flaky-test
...
`ls`: fix flaky test
2022-01-31 14:26:40 +01:00
Terts Diepraam
e01e2141f5
ls: fix flaky test ( #2969 )
2022-01-30 20:09:20 +01:00
Daniel Eades
784f2e2ea1
use semicolons if nothing returned
2022-01-30 15:08:26 +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
Terts Diepraam
2412e4cbf7
add some tests for Clap's InferLongArgs setting
2022-01-29 02:06:32 +01:00
electricboogie
8b6c1337aa
Fix broken test in certain Linux containers
2022-01-27 15:36:55 -06:00
Justin Tracey
b65815cd06
ls: fix clippy lints in tests
2022-01-21 15:56:42 -05:00
Terts Diepraam
77229aea86
ls: fix tests for windows
2022-01-18 13:47:50 +01:00
electricboogie
4bee6526bf
Add new test, never print error on deref-ed bad fd
2022-01-17 13:14:43 -06:00
electricboogie
15efba54c5
Use dir_entry metadata for dereferenced bad fds to match GNU, add comments, clippy lints
2022-01-16 10:20:50 -06:00
electricboogie
37ca6edfdc
Fix display of bad fd errors
2022-01-15 22:39:07 -06:00
kimono-koans
fd5310411e
ls: Fix device display ( #2855 )
2022-01-15 00:39:56 +01:00
kimono-koans
016d5e72ad
ls: Fix padding for dangling links in non-Long formats ( #2856 )
...
* Fix padding for dangling links in non-long formats
Co-authored-by: electricboogie <32370782+electricboogie@users.noreply.github.com>
2022-01-11 12:01:54 +01:00
Sylvestre Ledru
dcfdeb334d
Merge pull request #2854 from kimono-koans/ls_fix_errno_1
...
ls: Fix Errno 1, print errors at the md call point
2022-01-09 20:56:06 +01:00
moko256
5659bf8fae
ls: On Windows use DirEntry#metadata() instead of fs::metadata
2022-01-10 02:56:22 +09:00
electricboogie
4052d4ec6a
Add test for double printing dangling link errors
2022-01-08 12:10:52 -06:00
kimono-koans
4ea61545c6
Merge branch 'uutils:master' into ls_fix_errno_1
2022-01-07 21:48:53 -06:00
electricboogie
13d6d74fa3
Fix Windows test(?): inode request shouldn't error on Windows, b/c there are no inodes
2022-01-07 09:24:32 -06:00
electricboogie
882b8ddd7b
Fix test dir names for Windows
2022-01-06 15:41:53 -06:00
electricboogie
30b2425541
Fix newline when only dirs in base directory, and test
2022-01-06 14:58:56 -06:00
kimono-koans
421330d07a
ls: Improve error handling and other improvements ( #2809 )
...
* print error in the correct order by flushing the stdout buffer before printing an error
* print correct GNU error codes
* correct formatting for config.inode, and for dangling links
* correct padding for Format::Long
* remove colors after the -> link symbol as this doesn't match GNU
* correct the major, minor #s for char devices, and correct padding
* improve speed for all metadata intensive ops by not allocating metadata unless in a Sort mode
* new tests, have struggled with how to deal with stderr, stdout ordering in a test though
* tried to implement UIoError, but am still having issues matching the formatting of GNU
Co-authored-by: electricboogie <32370782+electricboogie@users.noreply.github.com>
2022-01-05 14:50:37 +01:00
kimono-koans
fd64e01d92
ls: Reduce binary size of ls by removing regex crate ( #2781 )
2021-12-22 18:31:45 +01:00
Jan Scheer
79d838b1c3
Merge branch 'master' into ls_selinux
2021-09-17 14:14:47 +02:00
Michael Debertol
5d7e7ed4c0
Merge pull request #2651 from jhscheer/ls_small_fix_for_test_from_2627
...
test_ls: add features for uutils called by ccmd
2021-09-13 18:35:32 +02:00
Jan Scheer
4dc6536bb9
Merge branch 'master' into ls_selinux
2021-09-13 13:42:51 +02:00
Jan Scheer
cd2153eac6
ls: (--context/-Z) add support for invalid utf8
...
If security context byte slice contains invalid utf8:
* issue warning
* show replacement characters for invalid utf8 sequences
2021-09-13 13:24:44 +02:00