Commit Graph

106 Commits

Author SHA1 Message Date
Laurent Arnoud
bd655f9c20
Remove unused imports on fs/file.rs 2020-01-19 18:40:34 +01:00
Benjamin Sago
490d9680c2 Merge branch 'fix-handling-maybe-unsupported-time-metadata' of https://github.com/ariasuni/exa into ariasuni-fix-handling-maybe-unsupported-time-metadata
# Conflicts:
#	src/fs/file.rs
#	src/options/filter.rs
#	src/options/view.rs
2020-01-19 16:46:51 +00:00
Benjamin Sago
64bd1b9a55
Merge pull request #584 from msehnout/fix-panic-on-broken-symlink
fix panic on broken symlink in git repository
2020-01-19 00:48:07 +00:00
Benjamin Sago
c5a1e8e103
Merge pull request #557 from BrennanMcDonald/master
Added checks for modified/accessed/created metadata
2020-01-19 00:39:40 +00:00
Benjamin Sago
4dab6237f1
Merge pull request #516 from VichoReyes/dothidden
Include symlinks to dirs when grouping dirs
2020-01-19 00:16:06 +00:00
ariasuni
a636d08f8b Fix handling of potentially unsupported time metadata
- Checking on a directory doesn’t tell us if supported elsewhere
(some filesystems, like tmpfs, don’t support created time)
- We want to be able to display a column even if some subfiles or
subdirectories don’t support it

So now if unsupported a time of zero is used, and displayed as `-`
2019-12-20 05:37:29 +01:00
Martin Sehnoutka
a7a8e99cf3 fix panic on broken symlink in git repository
The issue including reproducer is described here:
https://github.com/ogham/exa/issues/526
This commit includes proposed change as well as integration test.
2019-09-15 16:56:58 +02:00
Vicente Reyes
69a7e53ee3
include symlinks to dirs when grouping dirs
When using the option --group-directories-first, symlinks to directories
are now first too.
2019-09-04 14:16:16 -04:00
Brennan McDonald
215b779d35
Fixed copy-paste bug in access times. 2019-08-03 11:07:16 -07:00
Brennan McDonald
f19f7be726
Updated file.rs
Added checks to `file.rs` to ensure that file's metadata exists after `UNIX_EPOCH`.
If the file was accessed/modified/created after UNIX_EPOCH, the current day is displayed.
2019-07-31 15:43:31 -07:00
Bond_009
8b60285320 Fix build without default features 2019-07-19 20:40:21 +02:00
Bond_009
f599c7ce93 Update to Rust 2018 2019-07-19 20:40:21 +02:00
Benjamin Sago
f1a5b646fe
Merge pull request #378 from LlinksRechts/master
fixed git status not working in directories containing '../'
2019-07-15 04:00:11 +01:00
Benjamin Sago
081bce0479 Merge branch 'fix-warnings-and-rust-2018' of https://github.com/ariasuni/exa into ariasuni-fix-warnings-and-rust-2018
# Conflicts:
#	src/fs/dir.rs
2019-07-15 03:42:33 +01:00
Benjamin Sago
faed8f9b82
Merge pull request #457 from ariasuni/fix-sorting-by-created-time
Fix sorting by created time
2019-07-15 03:30:52 +01:00
Benjamin Sago
df9b32c892 Fix a couple warnings 2019-07-13 21:17:48 +01:00
Benjamin Sago
e936d7e09f Prevent infinite loop with -aaR
This happened because exa would recurse into `.` over and over again. There was nothing distinguishing the pseudo-entry for `.` that was being added by `--a` from a `.` passed in on the command-line, so it was looping forever.

It gets fixed by having the File value keep track of whether it’s an --all --all entry, and not recursing into directories with this field set.

Fixes #515
2019-07-13 21:14:42 +01:00
ariasuni
39a49a3d36 Check if the sort field is supported by the OS 2019-03-23 17:23:43 +01:00
ariasuni
56717c7336 Add “changed” sort option, to replace old incorrect “created” 2019-03-23 17:23:40 +01:00
ariasuni
b0da0c9055 Use correct metadata for created time 2019-03-23 17:18:18 +01:00
ariasuni
49ed3ed0f8 Fix clippy warnings and explicitely ignore a few, fix future deprecation 2018-12-16 20:50:37 +01:00
Benjamin Sago
2d8d8d9a5c
Merge pull request #444 from ariasuni/display-git-ignored-state
Display if a file is ignored by git
2018-12-06 21:17:48 +00:00
ariasuni
649744dc82 Use more accurate time to fix inconsistent sorting 2018-11-22 18:10:58 +01:00
ariasuni
80b0d9dd0d Display if a file is ignored by git 2018-11-20 18:12:38 +01:00
teresy
d63917af47 refactor: use shorthand fields 2018-11-06 17:43:01 -05:00
Benjamin Sago
ecc4138d56 Merge branch 'clippy_fixes' of https://github.com/thibran/exa into thibran-clippy_fixes
# Conflicts:
#	src/options/view.rs
#	src/style/lsc.rs
2018-10-13 22:07:35 +01:00
Benjamin Sago
a4d9b5314f
Merge pull request #405 from Don42/feature_only_dirs
Flag for only showing directories
2018-09-27 21:01:15 +01:00
Benjamin Sago
a8b5534d53
Merge pull request #373 from doy/directory-symlink
make exa on symlinks to directories show their contents
2018-09-26 20:58:18 +01:00
Marco 'don' Kaulea
5dffaf3076 Add period for consistency 2018-09-03 09:20:03 +02:00
Marco 'don' Kaulea
054cac6b82 Add option to only display directories
This allows printing directory trees without any files, only
showing the structure.
I haven't decided on a letter for the short option.

Implements #401
2018-07-12 18:51:14 +02:00
Thibaut Brandscheid
755876e9b6 fix most clippy warnings 2018-06-19 17:17:39 +02:00
Kornel
2976b487ab Replaced try!() with ? 2018-04-18 01:16:32 +01:00
Lukas Rysavy
2fc56d45ca fixed git status not working in directories containing '../' 2018-04-13 22:23:46 +02:00
Jesse Luehrs
9bb62fbd63 make exa on symlinks to directories show their contents
right now, `exa foo` and `exa foo/` behave differently, which is
confusing.

fixes https://github.com/ogham/exa/issues/192
2018-03-31 05:00:03 -04:00
Benjamin Sago
9896f9ed78
Merge pull request #343 from BenWhitehead/mix-hidden-sorting
Add new sort option `.name` and `.Name`
2018-03-16 16:46:55 +00:00
Benjamin Sago
f757300718 Upgrade libgit2
The ogham/git2-rs repository that exa uses in the Vagrant VM has also been updated. The only casualty was that some constants got namespaced.
2018-03-11 11:25:06 +00:00
Ryan Leung
e1a4ed87f2 add #[allow(unused)] for compatibility 2018-02-01 14:52:01 +08:00
Ryan Leung
7fb0347e93 remove unused import 2018-01-31 15:05:20 +08:00
BenWhitehead
a156d96768 Add new sort option .name and .Name
Add two new sort options `.name` and `.Name` which with ignore a leading
`.` if present on the file name before sorting according to `name` and
`Name`.

This new sort is convenient if you want to list hidden and unhidden
files sorted together.
2018-01-30 15:01:56 -08:00
Benjamin Sago
937b325e3a Add some ignored tests for sub-globbing 2017-09-30 09:17:29 +02:00
Benjamin Sago
166d1f5e5a Glob pattern ignore tests 2017-09-30 09:17:29 +02:00
Benjamin Sago
541e6855f2 Test some actual ignore caches 2017-09-30 09:17:29 +02:00
Benjamin Sago
476299e21f A note to my future self
It’s important to capture the current behaviour, even if it ends up being totally wrong.
2017-09-30 09:17:29 +02:00
Benjamin Sago
108dc80944 Ignore comments and blank lines when ignoring 2017-09-30 09:17:29 +02:00
Benjamin Sago
7b5b02d9f1 Extract function for parsing an ignore file 2017-09-30 09:17:29 +02:00
Benjamin Sago
1f23f3f0cc Don’t ignore .gitignore errors 2017-09-30 09:17:29 +02:00
Benjamin Sago
3d3ee8fd66 Typo fix 2017-09-30 09:17:29 +02:00
Benjamin Sago
827aa8bfc3 Ignore files matched in .gitignore
This doesn’t *completely* work: it seems to have trouble with ignored paths beginning with slashes, possibly amongst others. Also, .gitignore scanning could be made more efficient.
2017-09-30 09:17:29 +02:00
Benjamin Sago
b95446d834 Thread an ignore cache through the program
!
2017-09-30 09:17:29 +02:00
Benjamin Sago
07443e87ba Add a --git-ignore option that doesn’t do anything
!!
2017-09-30 09:17:28 +02:00