Commit graph

32 commits

Author SHA1 Message Date
Terts Diepraam
685493f72b ls: make path platform independent 2021-04-16 23:48:35 +02:00
Terts Diepraam
2c130ae7c0 ls: take -l into account with dereference-command-line 2021-04-14 14:42:14 +02:00
Terts Diepraam
5c28ac1b0d ls: dereference command line 2021-04-14 14:12:00 +02:00
Terts Diepraam
2997413d64 ls: refactor tests 2021-04-07 11:48:01 +02:00
Sylvestre Ledru
7cdeb18dff
Merge pull request #2026 from tertsdiepraam/ls/hide_and_ignore
ls: --hide and --ignore
2021-04-05 22:31:23 +02:00
Terts Diepraam
a50eae76a4 ls: some more tests for ignore & hide 2021-04-05 12:17:42 +02:00
Terts Diepraam
bbb27800c9 ls: fix windows tests and commit lock 2021-04-04 23:14:55 +02:00
Terts Diepraam
76308dbec9 ls: tests for invalid patterns for hide and ignore 2021-04-04 22:35:22 +02:00
Terts Diepraam
fa4272a19b ls: --hide and --ignore 2021-04-04 19:19:56 +02:00
Terts Diepraam
54e9cb09da ls: add tests for --hide-control-chars 2021-04-03 16:44:12 +02:00
Terts Diepraam
9cb0fc2945 ls: forgot to push updated tests 2021-04-03 13:15:19 +02:00
Terts Diepraam
2941dfd698
ls: quoting style (#1989) 2021-04-01 22:50:13 +02:00
Ricardo Iglesias
5f17719a59
Implemented --indicator-style flag on ls. (#1907)
* Implemented --indicator-style flag on ls.

* Rust fmt

* Grouped indicator_style args.

* Added tests for sockets and pipes.

Needed to modify util.rs to add support for pipes (aka FIFOs).

* Updated util.rs to remove FIFO operations on Windows

* Fixed slight error in specifying (not(windows))

* Fixed style violations and added indicator_style test for non-unix systems
2021-03-29 13:10:13 +02:00
Terts Diepraam
955c547adf
ls: overrideable -n option (#1917) 2021-03-26 19:12:01 +01:00
Terts Diepraam
23b70001a8
ls: version sort (#1898) 2021-03-25 20:24:53 +01:00
Terts Diepraam
de3f9b8186
ls: across & commas formats and width parameter (#1869) 2021-03-22 18:24:23 +01:00
Terts Diepraam
b9662c78a5
ls: possible fix for access time tests (#1866) 2021-03-22 10:14:59 +01:00
Terts Diepraam
25d4a08387
ls: long format author, group and owner (#1850)
This PR adds the options to customize what information is shown in long format regarding author, group & owner. Specifically it adds:
- `--author`: shows the author, which is always the same as the owner. GNU has this feature because GNU/Hurd supports a difference between author and owner, but I don't think Rust supports GNU/Hurd, so I just used the owner.
- `-G` & `--no-group`: hide the group information.
- `-o`: hide the group and use long format (equivalent to `-lG`).
- `-g`: hide the owner and use long format.

The `-o` and `-g` options have some interesting behaviour that I had to account for. Some examples:
- `-og` hides both group and owner.
- `-ol` still hides the group. Same behaviour with variations such as `-o --format=long`, `-gl`, `-g --format=long` and `-ogl`.
- They even retain some information when overridden by another format: `-oCl` (or `-o --format=vertical --format=long`) still hides the group.

My previous solution for handling the behaviour where `-l1` shows the long format did not fit with these additions, so I had to rewrite that as well.

The tests only cover the how many names (author, group and owner) are present in the output, so it can't distinguish between, for example, author & group and group & owner.
2021-03-21 16:18:06 +01:00
Terts Diepraam
39b07f670f tests/ls: adapt tests to --si and new size formats 2021-03-19 15:15:24 +01:00
Sylvestre Ledru
e521b46c09
Merge pull request #1820 from tertsdiepraam/master
ls: move from getopts to clap and structure configuration
2021-03-19 09:55:27 +01:00
aspen
4e29b693f8
uutils: change every target_os = "macos" to target_vendor = "apple" 2021-03-18 08:42:53 -04:00
Terts Diepraam
c5792a4c47 tests/ls: add tests for colors 2021-03-17 23:15:03 +01:00
Terts Diepraam
fd957dd148 ls: fix access time on windows 2021-03-15 14:09:29 +01:00
Terts Diepraam
10135dccef ls: fix unused import and improve coverage 2021-03-15 13:46:21 +01:00
Chad Brewbaker
c820329efd
muted test not for windows and added windows temp file convention (#1748)
* muted test not for windows and added windows temp file convention

* Update mktemp.rs

Revert windows mktmp template difference

Co-authored-by: Chad Brewbaker <chad@flyingdogsolutions.com>
2021-03-06 18:26:55 +01:00
Diego Magdaleno
8b12686888
ls: On Windows don't display files hidden by NTFS (#1662)
This little check, allows us to hide the files that
shouldn't be shown on the listing on Windows operating
systems.

Just like the "dot" in UNIX based operating systems
Windows uses its own file attributes to determine if a file
is hidden or not.

The lack of support for this option is normally an annoyance
for many users, this commit adds full support for this feature
2020-12-19 17:54:28 +01:00
Sylvestre Ledru
c506b5402b fix clippy warnings 2020-12-17 21:34:10 +01:00
Sylvestre Ledru
b133e28d3e test(ls) - also test the -h option 2020-12-15 14:06:17 +01:00
Sylvestre Ledru
2de9abf52b test(ls): add more ls tests 2020-12-15 12:10:12 +01:00
Sylvestre Ledru
b687a2742c test(ls): also test ls -R 2020-12-13 17:13:56 +01:00
Sylvestre Ledru
4068195a94 test(ls): add more tests 2020-12-13 12:14:34 +01:00
Roy Ivy III
de0375f909 tests ~ reorganize tests 2020-06-01 18:30:04 -05:00
Renamed from tests/test_ls.rs (Browse further)