Daniel
82bd588a05
Fixed warnings on Windows
2019-04-10 15:23:16 +02:00
Daniel
289e906478
Added basic FileType::new() implementation
...
Nothing fancy; it just avoids using the Unix FileTypeExt. Device files,
sockets, and pipes aren't a part of the regular file tree on Windows, so
it makes sense to ignore them for now.
2019-04-10 15:23:16 +02:00
Daniel
9316300adf
Implemented get_file_data
...
Also added a few supporting functions.
Every unsafe block (and there are many) has a list of assumptions that
must be true. Most of them are easy to verify: for example, almost all
pointers indicate something in the *sd_ptr buffer, which lives until the
very end. The rest of the pointers are to something Rust allocated, so
they'll also live to the end of the function.
2019-04-10 15:23:16 +02:00
Daniel
95c7679985
Added utilities for working win Windows API calls
2019-04-10 15:23:16 +02:00
Daniel
038f318ad3
Tests compile on Windows
...
Just shut off a bunch of test sections. Probably most can remain as long
as some of them get broken out into separate unix-only test sections.
2019-04-10 15:23:16 +02:00
Daniel
0f2f3ca12a
Added Owner::new() constructor
...
This allows the Owner to be constructed from the raw strings by the
Windows code.
2019-04-10 15:23:16 +02:00
Daniel
63b2955d3f
Added winapi dependency
2019-04-10 15:23:16 +02:00
Daniel
6a022c01bf
Compiles on Windows with new windows_utils module
...
windows_utils will be responsible for safely wrapping WinAPI calls. This
should result in minimal changes to the interfaces of the existing
modules: all that is needed is new (very simple) constructors.
2019-04-10 15:23:16 +02:00
João Costa
0dbc3b3a62
Make the --tree flag respect the --group-dirs value
2019-04-07 20:33:42 +02:00
H. Emre ARI
fa77894e61
change match to if for display enum
2019-04-01 20:42:04 +02:00
H. Emre ARI
9abab3fb65
add Display enum
2019-04-01 20:42:04 +02:00
H. Emre ARI
e33cde9248
fix wrong names
2019-04-01 20:42:04 +02:00
H. Emre ARI
ecec3ec9e5
add overrides_with to -a and -A flag
2019-04-01 20:42:04 +02:00
H. Emre ARI
d8eaecd30a
add almost-all flag
2019-04-01 20:42:04 +02:00
H. Emre ARI
4485087759
fix crash when given file doesn't exist
2019-04-01 20:42:04 +02:00
H. Emre ARI
b0c75f47cf
add almost-all flag
2019-04-01 20:42:04 +02:00
H. Emre ARI
709c139dd4
remove if-else check from mod and almost-all flag from flags
2019-04-01 20:42:04 +02:00
H. Emre ARI
cda15d1714
fix lsd -lh .. crash
2019-04-01 20:42:04 +02:00
H. Emre ARI
d35afe5d66
fix typo
2019-04-01 20:42:04 +02:00
H. Emre ARI
429fa52838
fix issue about --all option when displaying . and ..
2019-04-01 20:42:04 +02:00
H. Emre ARI
e5f3a27ce2
show current and parent directory issue#112
2019-04-01 20:42:04 +02:00
Abin Simon
fa6146cc5c
change size option 'small' to 'short'
2019-03-30 16:27:15 +01: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
0d20479c0f
stick to user colors for permissions
2019-03-29 11:30:37 +05:30
Abin Simon
2426efd5b0
bugfix: only one value for multi value options in clap
2019-03-27 14:10:38 +01:00
Matthias Beyer
bd25db9a04
Add "manual" clap alias for -A
...
This is requested as a feature, but because clap does not support
"short" aliases, we have to create another clap argument for this.
Not the best possible way to implement this (because the best way would
be to patch clap itself to allow short aliases) but the fastest one.
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
2019-03-15 14:16:39 +05:30
Abin Simon
3477b6e723
refactor how width is computed for colored strings
2019-03-12 12:01:19 +01:00
Peltoche
c6dcf2ed0f
Fall back on epoch if the modification time is invalid
...
This allow to avoid a panic each time it try to read a broken file.
2019-03-12 10:00:39 +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
deea0df83d
do not pass tense explicitly
2019-03-06 15:12:29 +01:00
Daniel Thomsen
0498ebd46c
Add -h arg for ls compatibility
2019-03-06 09:53:29 +01:00
Ryan O'Beirne
9ec57c47b2
Use package description in clap
2019-02-26 13:14:45 +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
aba3e96a28
color files with lscolors
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
Sebastian Zivota
e1138bbec3
Refactored classic mode
2019-02-03 12:04:37 +01:00
Sebastian Zivota
1b7eec351c
Added --classic flag
2019-02-03 12:04:37 +01:00
Peltoche
0fa68098e2
Improve the tree display
2019-01-23 23:09:34 +01:00
Peltoche
a17eb10656
Fix the permissions
2019-01-23 10:57:09 +01:00
Peltoche
6bdf9ca3c2
Fix a panic with multiple icon options
2019-01-22 19:36:12 +01:00
Peltoche
c4a99ed8f4
big refacto
2019-01-22 17:51:40 +01:00
Peltoche
581ff0920b
Handle the errors into the core
2019-01-22 17:48:07 +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
0d215dca50
Added SetuidDir
and SetuidFile
variants to Elem
and FileType
...
This allows us to display files and directories that have the uid
flag set with a red background.
2019-01-20 11:45:24 +01:00
Sebastian Zivota
5ad0fb1b21
Added unicode symbols in comments
2019-01-19 11:57:27 +01:00
Sebastian Zivota
5151446fcb
Added default icons to Icons
struct
...
Also added tests for unicode icon set
2019-01-19 11:57:27 +01:00