Commit graph

490 commits

Author SHA1 Message Date
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
Abin Simon
5c128780f1 fix long listing for symlinkd dirs 2020-08-29 17:13:35 +05:30
Abin Simon
cffda506f1 show contents for symlink folders(fix #345) 2020-08-29 17:13:35 +05:30
Abin Simon
d9b7a5599d do not expand sylink in grid display 2020-08-21 23:40:44 +05:30
zwPapEr
faea1c0051 arg: add support for dereference 2020-08-21 23:27:12 +05:30
Abin Simon
3512ca668f spcial char test only needd for unix 2020-08-08 14:31:32 +05:30
Abin Simon
a7df288df2 add tests for special chars in filename 2020-08-08 14:31:32 +05:30
Abin Simon
5d6392c995 escape special chars in filename 2020-08-08 14:31:32 +05:30
Abin Simon
bef4ad22a6 add test for short size render 2020-08-08 13:17:27 +05:30
Abin Simon
20a6a09695 fix regression causing size short to have space 2020-08-08 13:17:27 +05:30
Jay
549f559305 implement for windows too 2020-08-08 13:02:16 +05:30
Jay
07efe8faa7 change windows struct def 2020-08-08 13:02:16 +05:30
Jay
dc548c2d66 update comments 2020-08-08 13:02:16 +05:30
Jay
05c0888979 update symlink test and repeat test for dirs too 2020-08-08 13:02:16 +05:30
Jay
b15258006e add test for dir symlink 2020-08-08 13:02:16 +05:30
Jay
bcb76a036a update windows FileType 2020-08-08 13:02:16 +05:30
Jay
f3bbf686dc upadte comments 2020-08-08 13:02:16 +05:30
Jay
2b384ed1df refactor symlink check into FileType 2020-08-08 13:02:16 +05:30
Jay
0f8b558493 minor refactor of return value 2020-08-08 13:02:16 +05:30
Jay
3def8d0238 fix icon mistake 2020-08-08 13:02:16 +05:30
Jay
5d608e8493 change yaml icon to indicate data like json and avro 2020-08-08 13:02:16 +05:30
Jay
15736d1c7d fix symlink test 2020-08-08 13:02:16 +05:30
Jay
673374ecab change symlink file to match symlink dir (octicons) 2020-08-08 13:02:16 +05:30
Jay
9b1243f2b0 change to actual symlink icon 2020-08-08 13:02:16 +05:30
Jay
52a8ec70f9 unnecessary dots 2020-08-08 13:02:16 +05:30
Jay
618a83383a sort symlinks appropriatelt with dirs/files 2020-08-08 13:02:16 +05:30
Jay
95c8234e12 implement for windows too 2020-08-08 13:02:16 +05:30
Jay
bb23164d3b change windows struct def 2020-08-08 13:02:16 +05:30
Jay
736e9b7564 tidy comments 2020-08-08 13:02:16 +05:30
Jay
460b8459ca fix panic on broken symlinks; display as file 2020-08-08 13:02:16 +05:30
Jay
8b869ba2ce detect if symlink is_dir and show different icon:  2020-08-08 13:02:16 +05:30
Pingger Shikkoken
e3ed9fa6df Added missing "can" to the text.
The commit messages are more text, than the actual changes ... And even then I made a typo in the code, that I need to fix with this commit ... Stupid me.
2020-08-02 18:42:06 +05:30
Pingger Shikkoken
313369a00c Improve help for '--ignore-glob" argument
Adds the text ". More than one be specified by repeating the argument" to the help of the "--ignore-glob" argument.

(Should be considered, since I needed to dig into the code to find out how this argument works for multiple ignores)
2020-08-02 18:42:06 +05:30
nabakolu
ff08f444fe Added spaces instead of tabs 2020-06-03 10:36:25 +05:30
nabakolu
0f11c0e3fc added music icon for opus filetype 2020-06-03 10:36:25 +05:30
dvvvvvv
1474d6daa4 use as_deref instead as_ref().map(||...) 2020-05-31 16:46:54 +05:30
dvvvvvv
8e709f0ad9 Revert "use as_derf() instead of .map(~as_str())"
This function has been available since Rust 1.40.
2020-05-31 16:46:54 +05:30
dvvvvvv
366f0c3084 use as_derf() instead of .map(~as_str()) 2020-05-31 16:46:54 +05:30
dvvvvvv
9315eec59c cargo fmt 2020-05-31 16:46:54 +05:30
dvvvvvv
ace04d6b39 use name as file name when file name None 2020-05-31 16:46:54 +05:30
dvvvvvv
f39162dba9 revoke current path name 2020-05-31 16:46:54 +05:30
dvvvvvv
42e092b04a make not using canonical path when make parent path 2020-05-31 16:46:54 +05:30
dvvvvvv
a74f0be1c7 remove unused imports 2020-05-31 16:46:54 +05:30
dvvvvvv
7e773d9f5c cargo fmt 2020-05-31 16:46:54 +05:30
dvvvvvv
70aea2947b remove canonicalize in relative_name function and add None Display Option 2020-05-31 16:46:54 +05:30
dvvvvvv
00e4f04eec add path import to windows utility 2020-05-31 16:46:54 +05:30
dvvvvvv
e01238c09d change parameter of windows file permission utility function 2020-05-31 16:46:54 +05:30
dvvvvvv
218a867570 print . when path is same with base path 2020-05-31 16:46:54 +05:30
dvvvvvv
c404020e17 replace icon concat with format 2020-05-31 16:46:54 +05:30
dvvvvvv
08133b4ebb remove redundent edits 2020-05-31 16:46:54 +05:30
dvvvvvv
3141278c65 add relative path function 2020-05-31 16:46:54 +05:30
dvvvvvv
746a929ebf remove current/parent display option 2020-05-31 16:46:54 +05:30
dvvvvvv
708a6f5dc1 create display option of name 2020-05-31 16:46:54 +05:30
dvvvvvv
79adfff370 remove name property from Name struct 2020-05-31 16:46:54 +05:30
Jay
2107785d14 add wmv/wma icons and some playlist icons 2020-05-31 14:46:08 +05:30
dvvvvvv
517c6b6e72 remove closure 2020-05-31 14:08:19 +05:30
Hugo Osvaldo Barrera
fb931b5c9e One lock icon to rule them all 2020-05-03 12:16:34 +02:00
Hugo Osvaldo Barrera
0784b6bda1 Fix the icon for "ini"
ini files are config files (they're a standard in the Python world,
though definitely not exclusive to it).

For some reason, the previous mapping was a Windows logo, though,
ironically, much of the tooling that uses this file format is
*nix-specific.

Using a more generic icon for this.
2020-05-03 12:16:34 +02:00
Hugo Osvaldo Barrera
57b971515b Add a specific icons for poetry.lock
This file is a lockfile for poetry, a python dependency manager. It's
kinda like what cargo is to rust, but for python.
2020-05-03 12:16:34 +02:00
Andrew Chin
47d21ba4af Remove unneeded import to make clippy happy 2020-04-29 09:25:18 +05:30
zwPapEr
04129e8624 *: 🎨 add newline to each print error 2020-04-07 12:25:11 +05:30
zwPapEr
a017a3d054 fix err description deprecated 2020-04-07 12:25:11 +05:30
zwPapEr
645be4a668 delete fs canonicalize for show broken softlink without error
fix https://github.com/Peltoche/lsd/issues/72
2020-04-07 12:25:11 +05:30
jpda
ad25edcd7e added csharp, sln and razor icons 2020-01-22 19:18:06 +05:30
zwPapEr
d30f375078 revert the match to if else for blocks 2020-01-11 14:17:44 +05:30
zwPapEr
4e50ea2b55 inode: 🎨 update the inode help msg 2020-01-11 14:17:44 +05:30
zwPapEr
7ca7290e23 args/inode: 🔨 inode work with long 2020-01-11 14:17:44 +05:30
zwPapEr
11d10caf0f args: add inode(i) args for showing inode,name 2020-01-11 14:17:44 +05:30
zwPapEr
1af45a10e8 inode: 🎨 use option for inode, and two color for valid or not 2020-01-11 14:17:44 +05:30
zwPapEr
d9b68ccd10 test: 🔨 fix test after delete default, add inode windows test 2020-01-11 14:17:44 +05:30
zwPapEr
37a97353a1 inode: 🔨 using - for not supported windows inode 2020-01-11 14:17:44 +05:30
zwPapEr
da2e2081e3 test: 🎨 fix clippy style and tests, add an inode test
inode: 🔨 only get inode on unix, return 0 for windows
2020-01-11 14:17:44 +05:30
zwPapEr
0ebb39d60c impl showing inode by setting blocks
working on https://github.com/Peltoche/lsd/issues/276
2020-01-11 14:17:44 +05:30
Pierre Peltier
87e87d87cd Do not panic if the pipes a closed before all the output is written 2020-01-07 16:40:58 +01:00
dvvvvvv
f1fed05413 squeeze if-branches in date validation method 2019-12-16 16:41:50 +05:30
dvvvvvv
58d44a6450 change string literal into char literal 2019-12-16 16:41:50 +05:30
dvvvvvv
e6ee773277 add date validation message 2019-12-16 16:41:50 +05:30
dvvvvvv
50cf660567 change test parse to validation function 2019-12-16 16:41:50 +05:30
dvvvvvv
698bc2ef3b add date formatting validation 2019-12-16 16:41:50 +05:30
dvvvvvv
c4c9ee01f4 add date formatting feature 2019-12-16 16:41:50 +05:30
Pierre Peltier
200c5d2c68 Fix the spacing rules between the grid and online layout 2019-12-06 11:35:03 +05:30
Pierre Peltier
f344f42bfe Fix the tests and avoid a regression 2019-12-06 11:35:03 +05:30
Pierre Peltier
80ab697fb9 Fix the spacing, following the @meain recomandations 2019-12-06 11:35:03 +05:30
Pierre Peltier
d031c4b192 Revert the two space separator 2019-12-06 11:35:03 +05:30
Pierre Peltier
75f413ae8a Fix the tests about the name format 2019-12-06 11:35:03 +05:30
Pierre Peltier
53ad81f006 Fix the name and icon spacing 2019-12-06 11:35:03 +05:30
Pierre Peltier
7c0bdb6b6a Fix the display tree with the -l flag 2019-12-06 11:35:03 +05:30
Pierre Peltier
e4342f86d1 Remove the SizeUnit padding calculation
This padding calculation is not more required because the right padding
is handled by the term_grid package.

I hope be able to remove the left padding once I had push some changes
into the term_grid package.
2019-12-06 11:35:03 +05:30
Pierre Peltier
7ead8aec4e Remove the --prefix-indent flag
This flag is not more possible with the term_grid layout tool
2019-12-06 11:35:03 +05:30
Pierre Peltier
27f8fd3c6f Run clippy 2019-12-06 11:35:03 +05:30
Pierre Peltier
c7236ea04b Remove the "name-with-symlink" flag 2019-12-06 11:35:03 +05:30
Pierre Peltier
524ce6ba71 Fix the tests 2019-12-06 11:35:03 +05:30
Pierre Peltier
6064fc3b65 Handle the no-symlink flag 2019-12-06 11:35:03 +05:30
Pierre Peltier
41fd5a5b2a Use the term_grid package for the output of tree 2019-12-06 11:35:03 +05:30
Pierre Peltier
6ca2bd948d Merge the display functions 2019-12-06 11:35:03 +05:30
Pierre Peltier
f6c3e68463 Remove some unused stuff 2019-12-06 11:35:03 +05:30
Pierre Peltier
5b51b6cb94 Use the term_grid for the one line layout 2019-12-06 11:35:03 +05:30
Pierre Peltier
03adf997cc Remove the short/long output and use only the blocks 2019-12-06 11:35:03 +05:30
Pierre Peltier
2ee9f8b46a Fix the size tests 2019-12-06 11:35:03 +05:30
Pierre Peltier
8b8c776eaa Remove the not more used PadingRules struct 2019-12-06 11:35:03 +05:30
Pierre Peltier
8d9bcc3910 Avoid the meta vector copy 2019-12-06 11:35:03 +05:30