Commit Graph

199 Commits

Author SHA1 Message Date
Benjamin Sago
f8df02dae7 Batch source formatting
I read through every file and applied a couple of rustfmt suggestions. The brace placement and alignment of items on similar lines has been made consistent, even if neither are rustfmt's default style (a file has been put in place to enforce this). Other changes are:

• Alphabetical imports and modules
• Comma placement at the end of match blocks
• Use newlines and indentation judiciously
• Spaces around associated types
• Spaces after negations (it makes it more clear imho)
• Comment formatting
• Use early-returns and Optional `?` where appropriate
2020-10-10 20:02:55 +01:00
Benjamin Sago
c3c39fee0a Various misc clippy fixes 2020-10-10 15:57:40 +01:00
Benjamin Sago
a25cfe765d Remove some enum glob imports
These are holdovers from how I used to write Rust ("back in the day" of 2014). There are still some places in the code where I think it's worth glob-importing enums, but not these places.
2020-10-10 15:46:39 +01:00
Benjamin Sago
f0c139ca68 Better referencing
This commit makes changes to the way variables are referenced:

• Make types Copy when possible
• Make methods take `self` instead of `&self` where possible (trivially_copy_pass_by_ref)
• Remove unnecessary borrowing (needless_ref)
• Remove unnecessary cloning (clone_on_copy)
• Remove `ref` from match arms where possible (new Rust match ergonomics)
2020-10-10 15:30:19 +01:00
Benjamin Sago
70a30ed683 The Selfening
This commit uses Clippy to fix all the 'use_self' warnings. Using Self instead of the type name has been good Rust style for a while now, and it's become the style I'm used to seeing.
2020-10-10 13:55:26 +01:00
Benjamin Sago
04e2d4c692 Just straight-up roll our own logger
This commit removes the env_logger dependency, replacing it with a simple implementation. Doing so removes like ten other transitive dependencies that no longer need to be included in the build.

It also gains the ability to enable trace-level logging. The users crate, which contains such logging statements as of the version I published a few days ago, has been upgraded to celebrate.

Also, change the log imports to globs. I'm only interested that a file doing logging, not what level it's logging at.
2020-10-10 02:01:12 +01:00
Benjamin Sago
dbbc4e465b
Merge pull request #704 from LarsHaalck/master
Add --octal-permissions argument
2020-10-08 22:14:38 +01:00
Benjamin Sago
d901bb289c
Merge pull request #654 from ariasuni/cleaning
Clean code a bit and fix typos in code documentation
2020-10-08 21:49:20 +01:00
Lars Haalck
16046d57de
Add --octal-permissions argument
Using --octal_permissions will insert another column before the existing
permissions where permissions are encoded using octal values as
requested in #316
2020-07-24 13:47:34 +02:00
ariasuni
dba3f37b0a Fix Clippy lints 2020-05-24 21:43:55 +02:00
ariasuni
5a84953b4e Fix typos in code documentation 2020-04-19 06:54:06 +02:00
ariasuni
046af5cdd1 Use git2 instead of parsing .gitignore for --git-ignore
Fix #636
2020-04-19 05:52:35 +02: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
eaece8cc7a
Merge branch 'master' into customize-size-scale-colours 2020-01-19 09:57:58 +00:00
Benjamin Sago
2382be7524
Merge branch 'master' into add-missing-flags-in-docs 2020-01-19 09:40:22 +00:00
Benjamin Sago
416818fda2
Merge pull request #597 from FliegendeWurst/bugfixes
Two small bugfixes
2020-01-19 00:55:58 +00:00
Benjamin Sago
1f167dda41
Merge pull request #577 from 0rvar/feature/suppress-columns
Add support for suppressing table columns
2020-01-19 00:41:27 +00:00
Benjamin Sago
8ccff86940
Merge pull request #450 from Bond-009/2018
Update to Rust 2018
2020-01-18 23:23:43 +00:00
Benjamin Sago
44664bf757
Merge pull request #289 from mqudsi/optional_args
Optional args support
2020-01-18 23:22:17 +00:00
Orvar Segerström
250104c9da Add new suppress flags to --help 2019-12-23 12:08:03 +01: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
Maarten de Vries
3ef6195ffd Allow customizing size scale colours.
Also adjust the selection of the colour depending on the scale used.
 * With decimal prefixes colours change on powers of 1000.
 * With binary or no prefixes colours change on powers of 1024.
2019-11-17 16:49:51 +01:00
ecanja
aded70c98e Add missing flags in documentation files
- Update completions
  - fish		(-D)
  - zsh			(-D, --changed)
- Update man page	(--changed)
- Update README		(-F, --changed, --icons)
- Update help text	(--changed)
2019-11-12 01:18:51 +01:00
FliegendeWurst
6010ed5213
Use the long view when stdout isn't a terminal and a long grid view was requested (fixes #522) 2019-10-12 11:58:31 +02:00
Orvar Segerström
925f5173c1 Add support for suppressing table columns 2019-08-29 14:34:30 +02:00
Bond_009
f599c7ce93 Update to Rust 2018 2019-07-19 20:40:21 +02:00
Oleksii Filonenko
58c821be6e
Add documentation for --icons flag
- Update completions
  - fish
  - zsh
- Update man page
- Update help text
2019-07-19 09:58:50 +03:00
Benjamin Sago
9497b30b33 Merge branch 'glyphs' of https://github.com/asoderman/exa into asoderman-glyphs
# Conflicts:
#	src/options/flags.rs
#	src/options/view.rs
#	src/output/grid.rs
2019-07-15 03:54:31 +01:00
Benjamin Sago
9e1200f9b7 Fix failing tests 2019-07-15 03:37:05 +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
ariasuni
f0e7321506 Fix and add tests 2019-03-23 17:23:43 +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
80b0d9dd0d Display if a file is ignored by git 2018-11-20 18:12:38 +01:00
James Reed
7218fb4b6a
Document only-dirs option 2018-10-26 17:21:31 -06:00
James Reed
89a6e14e15
Move level option to correct group 2018-10-26 17:15:48 -06:00
Benjamin Sago
c2bb986618 Replace Default impls that use state with fns
The Default impls for DefaultFormat and LoadFormat were originally called ‘new’, to which Clippy suggested that they be changed. But as these functions change based on what the year is, a function called something other than ‘new’, like ‘load’.
2018-10-13 22:15:10 +01: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
Marco 'don' Kaulea
33167a2282 Add short option for only-dirs 2018-07-13 17:38:36 +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
mopp
991781070e refers TIME_STYLE environment variable if it exists and the argument is not given 2018-06-15 04:38:32 +09:00
Benjamin Sago
55048f7ee2
Merge pull request #380 from kornelski/master
Replaced try!() with ?
2018-05-28 10:50:06 +02:00
Benjamin Sago
5438f949c9
Merge pull request #311 from martinlindhe/master
adjust some spelling
2018-05-28 10:47:38 +02:00
Kornel
2976b487ab Replaced try!() with ? 2018-04-18 01:16:32 +01:00
Alex Soderman
68954f9142 Added --icons for oneline mode 2018-04-01 19:00:27 -04:00
Alex Soderman
5991bd4ab7 Added icons for --long view 2018-04-01 18:28:31 -04:00
Alex Soderman
217d1eefa9 moved icons functionality to grid mode 2018-03-26 17:02:05 -04:00