Commit graph

490 commits

Author SHA1 Message Date
auronandace
9bd7690af8 Fix Clippy lints
Update display.rs

Update color.rs

Update date.rs

Update date.rs

Update mod.rs

Update display.rs
2021-08-20 23:30:43 +08:00
Evan Sherwood
0246531e7f Add .mjs extension (ESM)
Re-use the JS icon for [ESM Modules with `.mjs` extension](https://nodejs.org/api/esm.html#esm_modules_ecmascript_modules).
2021-08-16 14:21:56 +08:00
Abin Simon
682a80d866 Remove unnecessary use of read_link 2021-08-15 22:48:56 +05:30
Fabricio Dematte
e5a531778a correctly parsing custom config file arg. match 2021-06-11 09:57:41 +05:30
Fabricio Dematte
0871fd0020 add config-file arg match 2021-06-11 09:57:41 +05:30
Mark Gardner
ddb4883f27 Add Perl module and test script icons 2021-05-21 19:00:55 +05:30
Prunkles
9f83b8d2a3 Add F# icons 2021-04-25 21:04:56 +05:30
zwPapEr
154fc1ef69 display/tree: 🔨 add space for better tree display
Signed-off-by: zwPapEr <zw.paper@gmail.com>
2021-03-27 20:13:05 +05:30
zwPapEr
8873f1c199 test: 🔍 🔨 fix tree test without sort
Signed-off-by: zwPapEr <zw.paper@gmail.com>
2021-03-27 20:13:05 +05:30
zwPapEr
2f9fd1e8de display: 🎨 delete tree color and apply review
Signed-off-by: zwPapEr <zw.paper@gmail.com>
2021-03-27 20:13:05 +05:30
zwPapEr
3cdf8fdf0d display/tree: show tree edge at first column when no name block
Signed-off-by: zwPapEr <zw.paper@gmail.com>
2021-03-27 20:13:05 +05:30
zwPapEr
ebcaaebad2 display/tree: 🔨 detect all subdir size width when tree
Signed-off-by: zwPapEr <zw.paper@gmail.com>
2021-03-27 20:13:05 +05:30
zwPapEr
2e47bac535 display/tree: 🔨 fix misaligned when tree, add color to tree edge
Signed-off-by: zwPapEr <zw.paper@gmail.com>
2021-03-27 20:13:05 +05:30
zwPapEr
072a9bd756 display/tree: 🔍 add test and changelog for show edge before name
Signed-off-by: zwPapEr <zw.paper@gmail.com>
2021-03-27 20:13:05 +05:30
zwPapEr
7f3d4ff9e2 display/tree: 🎨 show tree edge before name block
Signed-off-by: zwPapEr <zw.paper@gmail.com>
2021-03-27 20:13:05 +05:30
Abin Simon
4720fe7a36 fix some test imports 2021-03-12 18:52:05 +05:30
Abin Simon
292262fb40 Update classic help message 2021-03-12 18:52:05 +05:30
Abin Simon
1d763f6f98 Use size bytes when in classic mode 2021-03-12 18:52:05 +05:30
Abin Simon
c061218965 Remove tree test with --all
This seems to be different in macOS&Windows vs Linux. Fixing this so
that we can make a release. For some reason, this works randomly.
2021-03-07 12:31:16 +05:30
Abin Simon
22f5a6b992 Fix test involving config file for sorting 2021-02-17 09:21:58 +05:30
Abin Simon
7fad205682 Fix arg value parsing for flags that allow multiple input 2021-02-16 09:15:48 +05:30
Abin Simon
24e6335e0a Fix sorting with almost-all flag and a folder
With a folder structure (a folder `z` with a file `a`), if we do `lsd
-a` it used to be:

. a ..

instead of

. .. a

This was caused to the the parent meta having full path and us using
z/.. to sort .. entry. This should now be fixed with manually changing
the name to a .. .
2021-02-15 09:35:14 +05:30
zwPapEr
0ca699ee2f display/tree: 🔍 add test for tree with all not show self
Signed-off-by: zwPapEr <zw.paper@gmail.com>
2021-02-15 09:33:59 +05:30
zwPapEr
36002a35ac display/tree: 🔨 not showing . and .. when tree with all
fix https://github.com/Peltoche/lsd/issues/477

Signed-off-by: zwPapEr <zw.paper@gmail.com>
2021-02-15 09:33:59 +05:30
TheAlakazam
3c342f68b0 Code review fixes 2021-01-31 09:39:14 +05:30
Piyush Jaipuriyar
072696d72e Changed INodeCount to Links 2021-01-31 09:39:14 +05:30
Piyush Jaipuriyar
34beb08d1f Addressed review comments 2021-01-31 09:39:14 +05:30
TheAlakazam
52d6953cc6 Fix for #407: Show number of hardlinks for lsd -l 2021-01-31 09:39:14 +05:30
Sophie Tauchert
1396c59516 Fix clippy warning 2021-01-14 22:24:26 +05:30
Sophie Tauchert
dffc55b87b Fix typo 2021-01-14 22:24:26 +05:30
Sophie Tauchert
02441fdf38 Remove locale time style 2021-01-14 22:24:26 +05:30
Sophie Tauchert
957957024c Use recent date format for files older than 6 months 2021-01-14 22:24:26 +05:30
Sophie Tauchert
fbe20fcc32 Add test cases for iso and locale formatting 2021-01-14 22:24:26 +05:30
Sophie Tauchert
4ebbfaead2 Fix iso and locale time styles for older elements 2021-01-14 22:24:26 +05:30
Sophie Tauchert
3b814d03a7 Fix and test iso and locale time styles 2021-01-14 22:24:26 +05:30
Sophie Tauchert
d4fbedd1e4 Add test cases for order of precedence 2021-01-14 22:24:26 +05:30
Sophie Tauchert
2a93ce3a6e Invert order of flag parsing to return early 2021-01-14 22:24:26 +05:30
Sophie Tauchert
1107a259b3 Change order of flag parsing to arg -> env -> config 2021-01-14 22:24:26 +05:30
Sophie Tauchert
bc117cfee0 Fix error message for compatibility with previous version 2021-01-14 22:24:26 +05:30
Sophie Tauchert
ac91205932 Use serial test for environment variable tests 2021-01-14 22:24:26 +05:30
Sophie Tauchert
14a17f459f Use chrono crate instead of time, fix date time formatting 2021-01-14 22:24:26 +05:30
Sophie Tauchert
13ab690b18 Implement parsing date format from TIME_STYLE environment 2021-01-14 22:24:26 +05:30
Finn Hediger
572c43f329 Fix formatting 2021-01-14 14:21:44 +05:30
Finn Hediger
5604942dab Add a custom test case for the icon_separator 2021-01-14 14:21:44 +05:30
Finn Hediger
2341e20a1c Add example for separator to example config 2021-01-14 14:21:44 +05:30
Finn Hediger
fc5a1b5da6 Remove forgotten comments 2021-01-14 14:21:44 +05:30
Finn Hediger
7d5acedc20 Change name 'spacing' to 'separator' 2021-01-14 14:21:44 +05:30
Finn Hediger
d5df13acd6 Remove unnecessary comment 2021-01-14 14:21:44 +05:30
Finn Hediger
e669c76c87 Add simple test for IconSpacing 2021-01-14 14:21:44 +05:30
Finn Hediger
9e11a38f66 Remove --icon-spacing cli flag 2021-01-14 14:21:44 +05:30
Finn Hediger
f1ee37e805 Fix copied comments of the IconSpacing methods 2021-01-14 14:21:44 +05:30
Finn Hediger
8b9e281200 Update tests 2021-01-14 14:21:44 +05:30
Finn Hediger
9ef64deff0 Remove unused ICON_SPACING 2021-01-14 14:21:44 +05:30
Finn Hediger
10d4585492 Fix test by appending " ".to_string() to Icons::new calls 2021-01-14 14:21:44 +05:30
Finn Hediger
55c2692a63 Add --icon-spacing flag and icon.spacing config option
The spacing option takes a string and puts it between the icon and
the name. The default would be one space: " ".
2021-01-14 14:21:44 +05:30
Abin Simon
c089af22ab respect blocks passed without long from cli
When reading from config, we do not take into consideration the value
of blocks until we pass -l in the cli args, but if the user passes
in blocks via the cli, the -l flag is implied.
2021-01-01 13:26:06 +05:30
zwPapEr
f539dffe4d test: 🔍 🔨 make test name more clear, add reverse sort false
Signed-off-by: zwPapEr <zw.paper@gmail.com>
2020-12-13 10:43:03 +05:30
zwPapEr
7efe3aa36e config: 🔨 🎨 update code consistency due to review
Signed-off-by: zwPapEr <zw.paper@gmail.com>
2020-12-13 10:43:03 +05:30
zwPapEr
9b237bbf9e log: 📝 unique error output and update comment to fit config 2020-12-13 10:43:03 +05:30
zwPapEr
cf9030cdf7 config: 🔨 using target enum and vec string for config options
Signed-off-by: zwPapEr <zw.paper@gmail.com>
2020-12-13 10:43:03 +05:30
zwPapEr
3ef4ec6e81 test: 🔍 add glob add sorting test
Signed-off-by: zwPapEr <zw.paper@gmail.com>
2020-12-13 10:43:03 +05:30
zwPapEr
c8eddf6e2b config: 🔨 print error when config file error 2020-12-13 10:43:03 +05:30
zwPapEr
da99c70af6 test/flags: 🔍 🔨 update tests to fit serde yaml change
Signed-off-by: zwPapEr <zw.paper@gmail.com>
2020-12-13 10:43:03 +05:30
zwPapEr
aca34d9e25 config,flag: 🔨 refactor flag using serd yaml config 2020-12-13 10:43:03 +05:30
zwPapEr
e4d8d85678 config file: 🔨 uniq file and serde yaml parsing 2020-12-13 10:43:03 +05:30
zwPapEr
0e8ae256b5 config: 🔨 refactor read config by name 2020-12-13 10:43:03 +05:30
AJ ONeal
1cdef5fe96 use existing display and layout 2020-12-11 16:43:45 +05:30
AJ ONeal
42c3c8ca62 don't follow symlinks with tree -d 2020-12-11 16:43:45 +05:30
Jay
c67c639327 Implement lsd --tree -d
This commit implements the `-d` option in combination with `--tree` to mimic `tree -d` behaviour. There are also changes to the behaviour of `--tree` and `-R` such that they follow the same behaviour as `tree -d` and `ls -R` i.e. not follwoing symlinked directories unless the `-L` flag is specified.
2020-12-11 16:43:45 +05:30
Peter Stewart
b6bd1d3b55 Apply suggestions from code review
Co-authored-by: Abin Simon <abinsimon10@gmail.com>
2020-11-09 12:19:41 +05:30
Peter Stewart
3439e1d735 Make all known filenames & extensions lower-case and always match by lower-cased name 2020-11-09 12:19:41 +05:30
Peter Stewart
9435de8f78 Fix comments 2020-11-09 12:19:41 +05:30
Peter Stewart
d2094af48b Fix formatting issues 2020-11-09 12:19:41 +05:30
Peter Stewart
d774de41a0 Add case-insensitive matching of known filenames and extensions 2020-11-09 12:19:41 +05:30
VentGrey
0d51c7e1b9 Added space to comply with CI/CD styling 2020-11-04 11:14:27 +05:30
VentGrey
22b040160f renamed to .jl extension 2020-11-04 11:14:27 +05:30
VentGrey
413e2b2ddd Added julia icon for .jl files 2020-11-04 11:14:27 +05:30
zwPapEr
95535cb67c 🔨 move symlink arrow to root level 2020-11-02 22:00:53 +05:30
zwPapEr
b1f37c169f styling: 🔨 move symlink arrow to styling mod and use styling
fix https://github.com/Peltoche/lsd/issues/409
2020-11-02 22:00:53 +05:30
zwPapEr
8c2dc69f67 test/symlink-arrow: 🔍 add more test for symlink-arrow 2020-11-02 22:00:53 +05:30
zwPapEr
ce6ebc170a style: add config for symlink arrow 2020-11-02 22:00:53 +05:30
Jay
c747fea0e9 fix date localisation issues on windows
keep dates in ISO8601 to avoid problems
2020-10-28 22:43:11 +05:30
zwPapEr
3537575d8b icon: add ttc font file
fix https://github.com/Peltoche/lsd/issues/435
2020-10-25 11:02:18 +05:30
Jay
7eeda6c8a2 tidy up matches into maps 2020-10-18 10:51:26 +05:30
zwPapEr
da97ee40f2 skip extension if no ext found
fix https://github.com/Peltoche/lsd/issues/387
2020-10-18 10:51:26 +05:30
Aaron Sun
153576baeb Add more archive icons 2020-10-17 09:33:33 +05:30
Aaron Sun
0ff6f9f34f Remove duplicate line 2020-10-17 09:33:33 +05:30
Tomasz Kłak
4991436cdf Adds sort flag 2020-10-03 17:36:42 +05:30
LHY-iS-Learning
4b0aad609a Fix #408, vol.2 2020-10-02 17:52:44 +05:30
LHY-iS-Learning
353c5ab04c Fix #408 2020-10-02 17:52:44 +05:30
Kai Moschcau
1bebe5b7c6 Reword ignore config option 2020-10-02 10:08:37 +05:30
Kai Moschcau
55a96a114d Add ability to configure default options with file
# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	README.md
#	src/app.rs
#	src/core.rs
#	src/display.rs
#	src/flags.rs
#	src/meta/mod.rs
#	src/sort.rs
#	tests/integration.rs
2020-10-02 10:08:37 +05:30
Zach Coyle
5fea5cda09 Add Nix icon 2020-09-28 10:18:25 +05:30
zwPapEr
16f1b1ce7c sort: add version sort
fix https://github.com/Peltoche/lsd/issues/394
2020-09-19 15:37:47 +05:30
Abin Simon
08a55f90d3 use last sort flag for sort
Previously the order was predefined in the binary based on all the ones
that we had. Now we can use the last sort arg passed as the index to
sort.
2020-09-18 19:49:04 +05:30
Allen Hsu
b6378b0ca1 Add support for extension sort. 2020-09-18 19:30:33 +05:30
Allen Hsu
85bee8ba86 Use vec of function pointers over sorting closure. 2020-09-12 15:19:12 +05:30
Allen Hsu
ae11a29ae1 Refactor dirlike into FileType. 2020-09-12 15:19:12 +05:30
Allen Hsu
e7b46aa291 Cache sorter on Core. 2020-09-12 15:19:12 +05:30
Allen Hsu
874d07f89d Create closure to do sorting. 2020-09-12 15:19:12 +05:30