Commit graph

130 commits

Author SHA1 Message Date
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
zwPapEr
1af45a10e8 inode: 🎨 use option for inode, and two color for valid or not 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
200c5d2c68 Fix the spacing rules between the grid and online layout 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
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
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
Pierre Peltier
61e2e88d8e Handle the block padding in a generic way 2019-12-06 11:35:03 +05:30
Pierre Peltier
f3481ceef6 Split the rendering of size parts 2019-12-06 11:35:03 +05:30
Pierre Peltier
3eaf763745 Split the size value and the size unit
This will allow to handle all the block in a generic way
2019-12-06 11:35:03 +05:30
Roy Ivy III
a3b162202a refactor/polish ~ fix cargo fmt complaints 2019-12-04 11:09:11 +01:00
Aaron Lichtman
9086628855 Remove TODO 2019-09-02 15:04:03 +02:00
Aaron Lichtman
b19e54e3ab Change flag to --prefix-indent 2019-09-02 15:04:03 +02:00
Aaron Lichtman
66eb8532c2 Add indent flag.
Fix #22. For some reason this breaks file icon rendering?
2019-09-02 15:04:03 +02:00
Philipp Mildenberger
3facd44840 refactored 'Size' to only contain bytes. The unit is calculated only when needed. Added a new --size option 'bytes' to display the filesize in bytes (without unit) this is the default of ls 2019-07-17 10:27:59 +00:00
Abin Simon
f1275b0e60 fix all spacing issues 2019-06-18 14:44:39 +02:00
thammin
7177c187da should return 0 length when not showing indicator 2019-06-18 14:25:06 +05:30
thammin
c3a9f9c62e fix name padding to include indicator's length 2019-06-18 14:25:06 +05:30
Abin Simon
e74b416bca remove last space from result vec 2019-06-09 13:02:05 +02:00
Abin Simon
2642544210 fix display for --tree with --long 2019-06-09 13:02:05 +02:00
Abin Simon
119ddb3aa4 fix padding of name and symlink
Will fix the issue where even the padding would have the background
color.
2019-06-09 13:02:05 +02:00
Abin Simon
e145697b4e add --no-symlink option 2019-06-09 13:02:05 +02:00
Abin Simon
4767ef8c11 fix tests 2019-06-09 13:02:05 +02:00
Abin Simon
bc05fa5f3a cleanup old code 2019-06-09 13:02:05 +02:00
Abin Simon
517445d768 fix dispaly with symlink 2019-06-09 13:02:05 +02:00
Abin Simon
8cbdde30e1 do not keep filetype as a seperate option 2019-06-09 13:02:05 +02:00
Abin Simon
61b8f5d7fd have most of it working 2019-06-09 13:02:05 +02:00
Abin Simon
86d4fb8215 fix name spacing 2019-06-09 13:02:05 +02:00
Abin Simon
dd5e8733f2 enable only certain blocks using --blocks 2019-06-09 13:02:05 +02:00
Thomas Magalhaes
a4f6b4bc18 flags: allow to mix --long and --tree
Refs: #185
Closes: #204
2019-05-29 13:54:30 +05:30
Gavin Panella
edfee423a3 Fix listing of user-given arguments. 2019-05-24 17:58:09 +02:00
Gavin Panella
28623cf6bd Avoid filtering the metas in the display output code. 2019-05-21 12:08:10 +02:00
Atul Bhosale
f619dc07d6 Format code using 'cargo fmt' 2019-05-17 19:59:19 +02:00
Abin Simon
e6de6d54f0 add a new way to style size 2019-03-29 17:11:48 +01:00
Abin Simon
854ed96594 change from two spaces to one 2019-03-29 11:30:37 +05:30
Abin Simon
3477b6e723 refactor how width is computed for colored strings 2019-03-12 12:01:19 +01:00
Abin Simon
c9b3550f61 fix spacing issue on colors 2019-03-11 18:01:36 +01:00
Peltoche
27d57b2b86 Handle all the color code format for the visible width calculation 2019-03-11 18:01:36 +01:00
Sebastian Zivota
e05b389986 Added Layout enum 2019-03-11 13:25:30 +01:00
Abin Simon
67bf8d742e Update tests to work with LSCOLORS update
Added another enum value to Theme `NoLscolors`.
As of right now it only helps with tests, but maybe useful for something
in future.

Colouring based on LSCOLORS should be tested in the package so we should
be good.
2019-02-17 12:17:29 +01:00
Abin Simon
e8015ebd3e switch to one line when not outputting to tty 2019-02-16 13:11:28 +01:00
Peltoche
e4882c5c99 Fix the module import paths 2019-02-16 11:34:33 +01:00
Peltoche
0fa68098e2 Improve the tree display 2019-01-23 23:09:34 +01:00
Peltoche
c4a99ed8f4
big refacto 2019-01-22 17:51:40 +01:00
Sebastian Zivota
70af39ed0a Added data to File and Dir variants of Elem, FileType enums
This obviates the need for separate variants for such things as
executableness and setuid.
2019-01-20 11:45:24 +01:00
Sebastian Zivota
390f5e4280 Renamed theme flag to icon-theme and default option to fancy 2019-01-19 11:57:27 +01:00
Peltoche
092c961ea7 Do not panic in case of broken pipe 2019-01-16 15:06:01 +01:00
Peltoche
e30ac3827a Fix the get_visible_width with no color set 2018-12-20 17:23:36 +01:00
Kenta Kubo
a8162471bc Remove unused import 2018-12-20 14:01:03 +01:00
Kenta Kubo
c1a3ef81ac cargo fmt src/display.rs 2018-12-20 14:01:03 +01:00
Kenta Kubo
1ecbdeef46 Add tests for Display::get_visible_width 2018-12-20 14:01:03 +01:00
Kenta Kubo
fca6498d99 Use unicode-width crate to count width of filename 2018-12-20 14:01:03 +01:00
Peltoche
be41956919 Fix the lint errors 2018-12-14 16:20:22 +01:00
Abin Simon
f31afa8ab7 Add option to show relative date 2018-12-13 12:27:54 +01:00
Abin Simon
2548af1218 Use print instead of println to display output
Avoid the extra line being printed at the end
2018-12-13 10:52:56 +01:00
Peltoche
78f13841e8 Run cargo fmt 2018-12-12 11:46:50 +01:00
Peltoche
7e158ae6b9 Create the flags package and move the Options struct into it 2018-12-08 14:54:18 +01:00
Peltoche
f843e6db72 Change the display order 2018-12-07 20:20:31 +01:00
Peltoche
21111ff316 Use print_one_per_line if no tty is available 2018-12-05 21:30:14 +01:00
Peltoche
526f020695 Do not colorize when the stdout is not a tty 2018-12-05 20:25:48 +01:00
Yann Leretaille
dba7022a85 fixes #11 2018-12-05 10:23:44 +01:00
Peltoche
b60bab1bdd
Handle the --tree option 2018-12-04 14:54:56 +01:00
Peltoche
a4a494a5bc
Add the -1 option 2018-12-02 18:19:57 +01:00
Peltoche
9e16d6620b
Display all the batch a once 2018-12-02 18:16:02 +01:00
Peltoche
e425bd9d3a
Use ANSIString for rendering 2018-12-02 18:13:46 +01:00
Peltoche
e375a19f5b
Add the Display struct 2018-12-02 17:22:51 +01:00