Commit graph

251 commits

Author SHA1 Message Date
Sandro-Alessio Gierens c7d2e2bd7d fix(cargo): add vendored-libgit2 feature to git2 dependency
This builds libgit2 into the binary to avoid dependency problems on
systems that don't have the required version of libgit2 yet.

Signed-off-by: Sandro-Alessio Gierens <sandro@gierens.de>
2023-09-04 09:29:02 +02:00
Christina Sørensen c23cd693ff
chore: release 0.11.0
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-09-04 04:12:16 +02:00
Robert Minsk bf5d602dc6 refactor: Use phf macros instead of codegen to create icon and filetype tables 2023-09-02 13:28:20 -07:00
Robert Minsk c8c2b1c7d0 feat: Use perfect hash tables for file types and icons 2023-09-02 13:28:20 -07:00
dependabot[bot] 6e82e5afe6
chore(deps): bump timeago from 0.3.1 to 0.4.1
Bumps [timeago](https://github.com/vi/timeago) from 0.3.1 to 0.4.1.
- [Release notes](https://github.com/vi/timeago/releases)
- [Commits](https://github.com/vi/timeago/compare/v0.3.1...v0.4.1)

---
updated-dependencies:
- dependency-name: timeago
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-01 06:26:13 +00:00
dependabot[bot] 8854b13fb0
chore(deps): bump terminal_size from 0.1.16 to 0.2.6
Bumps [terminal_size](https://github.com/eminence/terminal-size) from 0.1.16 to 0.2.6.
- [Release notes](https://github.com/eminence/terminal-size/releases)
- [Commits](https://github.com/eminence/terminal-size/compare/v0.1.16...v0.2.6)

---
updated-dependencies:
- dependency-name: terminal_size
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-01 05:49:46 +00:00
dependabot[bot] c1e737d3b8
chore(deps): bump uzers from 0.11.1 to 0.11.2
Bumps [uzers](https://github.com/rustadopt/uzers-rs) from 0.11.1 to 0.11.2.
- [Release notes](https://github.com/rustadopt/uzers-rs/releases)
- [Changelog](https://github.com/rustadopt/uzers-rs/blob/main/CHANGELOG.md)
- [Commits](https://github.com/rustadopt/uzers-rs/compare/v0.11.1...v0.11.2)

---
updated-dependencies:
- dependency-name: uzers
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-09-01 05:14:42 +00:00
dependabot[bot] 90ee3b0b99
chore(deps): bump git2 from 0.17.2 to 0.18.0
Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.17.2 to 0.18.0.
- [Changelog](https://github.com/rust-lang/git2-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/git2-rs/compare/0.17.2...git2-0.18.0)

---
updated-dependencies:
- dependency-name: git2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-28 22:19:34 +00:00
Christina Sørensen 8e6a4807b0
chore: release 0.10.9
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-08-28 10:48:52 +02:00
Christina Sørensen 6e5920597d
Merge branch 'main' into move-to-uzers 2023-08-22 16:07:11 +02:00
Sandro-Alessio Gierens aec1c95831 deps: change users depedency to uzers
Signed-off-by: Sandro-Alessio Gierens <sandro@gierens.de>
2023-08-22 11:41:07 +02:00
Christina Sørensen 2b674bcd99
chore: release 0.10.8
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-08-22 10:56:09 +02:00
Christina Sørensen a030c580dd
Merge branch 'main' into dependabot/cargo/num_cpus-1.16.0 2023-08-16 07:34:14 +02:00
Christina Sørensen c268f9264d
Merge branch 'main' into dependabot/cargo/git2-0.17.2 2023-08-15 16:47:00 +02:00
sefidel d3e8aee8d5
docs: cafkafk -> eza-community
Signed-off-by: sefidel <contact@sefidel.net>
2023-08-14 23:54:08 +09:00
dependabot[bot] 7bdf48ee2e
chore(deps): bump git2 from 0.16.1 to 0.17.2
Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.16.1 to 0.17.2.
- [Changelog](https://github.com/rust-lang/git2-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/git2-rs/compare/0.16.1...0.17.2)

---
updated-dependencies:
- dependency-name: git2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-13 05:31:56 +00:00
dependabot[bot] e9f7f80954
chore(deps): bump num_cpus from 1.13.0 to 1.16.0
Bumps [num_cpus](https://github.com/seanmonstar/num_cpus) from 1.13.0 to 1.16.0.
- [Release notes](https://github.com/seanmonstar/num_cpus/releases)
- [Changelog](https://github.com/seanmonstar/num_cpus/blob/master/CHANGELOG.md)
- [Commits](https://github.com/seanmonstar/num_cpus/compare/v1.13.0...v1.16.0)

---
updated-dependencies:
- dependency-name: num_cpus
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-13 05:31:53 +00:00
Christina Sørensen 305b3e2141
chore: release 0.10.7
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-08-13 07:23:35 +02:00
Christina Sørensen 6f345bd3b2
chore: release 0.10.6
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-08-07 20:05:34 +02:00
Christina Sørensen ad746f1d0a
chore: release 0.10.5
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-08-03 10:14:47 +02:00
Christina Sørensen 1a5a60007c
chore: release 0.10.4
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-08-02 08:36:14 +02:00
Christina Sørensen c72a021f3e
chore: bump to v0.10.3
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-07-31 06:43:54 +00:00
Christina Sørensen cd9516a55f
ci: Update Cargo.toml
apparently 1.171.0 is too bleeding edge

Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-07-30 17:42:27 +00:00
Christina Sørensen b9295d8066
chore: bump to v0.10.2
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-07-30 19:32:44 +02:00
Christina Sørensen dd5e8dab91
fix: bump rust to 1.71.0
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-07-30 12:09:35 +02:00
Christina Sørensen 24655dfea5
Merge branch 'main' into pr-1061
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-07-30 06:01:15 +02:00
Christina Sørensen 064282843c
fix(grid): fixed grid bug
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-07-29 17:40:41 +02:00
Christina Sørensen 90a26aa88d
Merge branch 'main' into pr-1160 2023-07-29 16:19:28 +02:00
Christina Sørensen 1f2679e2b3
feat: Update Cargo.toml to optimise binaries for size
see: https://github.com/cafkafk/eza/pull/23#issuecomment-1656739548

Co-authored-by: sbatial <mail@kbode.com>
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-07-29 14:17:58 +00:00
dependabot[bot] 511ee7ad36
Bump git2 from 0.13.20 to 0.16.1
Bumps [git2](https://github.com/rust-lang/git2-rs) from 0.13.20 to 0.16.1.
- [Changelog](https://github.com/rust-lang/git2-rs/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rust-lang/git2-rs/compare/0.13.20...0.16.1)

---
updated-dependencies:
- dependency-name: git2
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-07-29 12:44:51 +00:00
Christina Sørensen a607d16ebe
fix: changed bin name via cargo.toml
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
2023-07-29 14:13:42 +02:00
Denis Cornehl 1d950086bc Resolves #270: add support for --time-style=relative 2023-03-07 17:34:35 +01:00
Victor Song 89bcc00e32 Upgrade to latest stable Rust and edition 2021 2023-02-24 18:29:37 -05:00
Mélanie Chauvel f3ca1fe6f7
Merge pull request #820 from skyline75489/chesterliu/dev/win-support
Initial support for Windows
2023-02-20 14:19:47 +01:00
zen1tho def77cc14e
Update Cargo.toml to optimise binaries for size
Strip binaries, change optimisation level to heavily optimise for size, change codegen units to 1, which slows compile times but adds maximum size optimisations.
2023-02-16 23:56:27 +00:00
Mélanie Chauvel 8c2956a8fd Add rust-version in Cargo.toml 2022-05-08 03:13:03 +02:00
Chester Liu d6732aea10 Merge branch 'master' into chesterliu/dev/win-support 2022-05-06 13:22:24 +08:00
Bastien Orivel af208285e8 Update term_grid to 0.2 2021-12-10 13:21:13 +01:00
Chester Liu 99d653b7fa Merge branch 'master' into chesterliu/dev/win-support 2021-10-29 15:50:54 +08:00
ariasuni 75f14d23a3 Update Cargo.toml to make cargo-deb work again 2021-09-17 20:58:49 +02:00
Chester Liu 23a1c8a41f Merge branch 'master' into chesterliu/dev/win-support 2021-05-15 22:03:21 +08:00
ariasuni a85c72e2a0 Replace unmaintained crate term_size by terminal_size 2021-04-27 00:16:25 +02:00
Chester Liu 8f0e4ccfdd Merge branch 'master' into chesterliu/dev/win-support 2021-04-13 11:27:49 +08:00
Benjamin Sago 293372a613 v0.10.1 2021-04-12 22:28:31 +01:00
skyline75489 0adc5c789b Merge branch 'master' into chesterliu/dev/win-support 2021-04-06 16:13:15 +08:00
Benjamin Sago 505808fd9f The road ahead 2021-04-04 23:03:53 +01:00
Benjamin Sago 03cd3a81ff v0.10.0 2021-04-03 17:42:56 +01:00
Benjamin Sago aee9c0e623 Remove some unused Cargo.toml options 2021-04-03 17:41:54 +01:00
skyline75489 8ad46e2ee5 Merge branch 'master' into chesterliu/dev/win-support 2021-04-03 21:12:19 +08:00
Benjamin Sago 004589d079 Upgrade datetime to remove some dependencies 2021-04-01 16:58:01 +01:00
Benjamin Sago 83f245237b Faster debug builds by excluding debug symbols
This also cleans up the release profile in Cargo.toml, which was having its default settings overridden with identical default settings.
2021-04-01 10:30:21 +01:00
Chester Liu 5503e4756e Clean 2021-03-26 18:45:52 +08:00
Chester Liu 6a642d0f32 merge 2021-03-26 16:37:17 +08:00
Benjamin Sago 8046980806 Mass version upgrade
This upgrades the versions of everything, including upgrading almost all outdated dependencies.

• number_prefix had some backwards-incompatible changes. It now feels more Rustful, and spells "Mebi" correctly.
• term_grid stopped working when I upgraded it, worryingly, so I reverted it back.
2020-10-10 02:14:35 +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 5ca3548bb1 Inline the library into the binary
This commit removes the library portion of exa. Cargo now only builds a binary.

The original intent was for exa to have its own internal library, and have the binary just call the library. This is usually done for code cleanliness reasons: it separates the code that implements the purpose of the program (the "plumbing") from the code that the user interacts with (the "porcelain"), ensuring a well-defined interface between the two.

However, in exa, this split was in completely the wrong place. Logging was handled in the binary, but option parsing was handled in the library. The library could theoretically print to any Writer ("for testing", it said), but it's far easier to run integration tests by executing the binary than to change the code to handle unit tests, so this abstraction isn't gaining us anything.

I've also had several people ask me if exa should be packaged for Linux distributions as a library, or just a binary. Clearly, this is confusing!

In several of my other Rust projects, I've done this better, with the command-line option parsing and log printing done on the binary side. It also turns out that you don't need to have a [lib] section in the Cargo.toml, so that's gone too.
2020-10-10 01:43:42 +01:00
Benjamin Sago 0550faec05 Replace Makefile with a developmental Justfile
This commit deletes the Makefile, which contained targets to build exa and install it on the local machine, and replaces it with a Justfile, which only contains command to build and test exa.

My reasoning for doing this is as follows:

• exa is increasingly being installed through package managers, rather than built and tested locally, so users are avoiding using the Makefile at all.
• It was a pain to keep up with the correct paths for installing the binary, man pages, and completions, which can vary between OSes. By removing them, the code in this repository need only concern itself with building exa and putting its files in the 'target' directory, simplifying things.
• just is much simpler than make conceptually, which is why I prefer it. It just runs commands, rather than being a complete build system, which we already use Cargo for.
• just has features built-in, such as listing tasks, that we've had to create make targets for.
• exa only needed a Makefile at all because it pre-dates Cargo!
• Other Rust projects seem to be getting along perfectly fine without one.

If I've missed some important reason that makes it worth keeping the Makefile around then please let me know.
2020-10-10 00:57:04 +01:00
Igor Raits 80875aac8f
chore: Update users to 0.10
Signed-off-by: Igor Raits <i.gnatenko.brain@gmail.com>
2020-05-22 08:44:04 +02:00
Igor Raits da1ac5139b
chore: Update zoneinfo_compiled, datetime to 0.5
Signed-off-by: Igor Raits <i.gnatenko.brain@gmail.com>
2020-05-17 09:40:54 +02:00
Kat Marchán 7f717c3af3 checkpoint 2020-05-02 19:00:06 -07: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 5683b5796e
Merge branch 'master' into cargo-deb-spec 2020-01-18 22:41:53 +00:00
Bond_009 f599c7ce93 Update to Rust 2018 2019-07-19 20:40:21 +02:00
Benjamin Sago 479fdea02c v0.9.0 2019-07-15 04:07:45 +01:00
Benjamin Sago f7a985bf43 Merge branch 'vendored-openssl' of https://github.com/cecton/exa into cecton-vendored-openssl
# Conflicts:
#	Cargo.lock
#	Cargo.toml
2019-07-14 11:55:30 +01:00
Benjamin Sago 19a2eb168a git2-rs v0.9.1
Most importantly, binaries produced from this version don’t link to http-parser (or at least they didn’t when I tried it), so the Vagrantfile doesn’t need to configure the custom version of it.
2019-07-14 11:42:58 +01:00
Benjamin Sago c7b4674de2 ansi-term v0.12.0 2019-07-14 11:39:41 +01:00
Benjamin Sago 9f76f94f88 Bump zoneinfo_compiled to v0.4.8
Fixes #517. The commit in zoneinfo-compiled fixes a bug where missing flags in the tzinfo file were making it crash instead of being treated as 0 values.
2019-07-14 10:08:41 +01:00
Bernardo Meurer 781d79e665
Updated dependencies 2019-04-16 22:53:42 -07:00
Laurent Arnoud f2d1c28417
Update env logger to 0.6 (no change needed) 2019-01-17 18:31:32 +01:00
Cecile Tonglet dd015057d5 Upgrade git2 and added flag vendored-openssl 2019-01-06 12:44:49 +01:00
Benjamin Sago 058b4a57bd Bump users crate version
And remove an unnecessary allocation while we’re at it. Fixes #442
2018-12-07 00:59:05 +00:00
Igor Gnatenko e2d21ab9c1
Exclude unneded files from crates.io 2018-11-14 14:27:05 +01:00
golem131 2f3b62b9b5 users library dependency update 0.6 -> 0.7 2018-06-07 12:41:09 +03:00
Laurent Arnoud eff7122bb2
Update log to 0.4 and env_logger to 0.5
No change needed for ansi_term to 0.11
2018-05-03 19:40:04 +02: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
Benjamin Sago 78e483551c
Merge pull request #322 from ogham/exa/lazy_static-v1
bump lazy_static to 1
2018-03-11 09:40:37 +00:00
Benjamin Sago 8147c04a92
Merge branch 'master' into users 2018-03-11 09:38:17 +00:00
Igor Gnatenko 318fc44bf0 bump lazy_static to 1
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-11-30 23:37:56 +01:00
Igor Gnatenko c9dc4720ec bump users to 0.6
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-11-27 13:21:37 +01:00
Igor Gnatenko 4013562525 bump env_logger to 0.4
Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
2017-11-21 07:32:03 +01:00
Benjamin Sago 433f031161 Upgrade datetime to remove crates and fix build
The datetime crate used to bring in a lot more crates as dependencies (datetime#ce7d12adc5f65519c8290f1bce2eb77fca44f460), but now does not. The version increase also fixes #301.
2017-10-08 21:38:08 +01:00
Benjamin Sago c7497f3778 Display more information for non-release releases 2017-10-08 20:09:46 +01:00
Benjamin Sago 4c3fd5483d Upgrade ansi_term
(and remove getopts). I had to fix something in ansi_term (ansi_term#090e0a383d73a43e2f80a7b466e8feeee97c4c76) to get it to build!
2017-10-02 12:16:25 +02:00
Benjamin Sago 877265bf4e Version bump and release 2017-09-30 09:49:36 +02:00
Benjamin Sago 1efb8a5113 Use crates.io zoneinfo_compiled
Fixes #189, for #132.
2017-09-30 09:48:04 +02:00
Benjamin Sago 377260d88c Start logging at opportune moments
I want to be very careful when doing the “--git and --tree don’t work together” one to not search for more Git repositories than I should. Being able to log when a repository is looked up and also switch that functionality on and off would help with that.
2017-08-19 10:06:43 +01:00
Benjamin Sago a6ed42105d By lines, I meant details
Yeah, I forgot what I was meant to be doing half-way through.

This also adds the row_threshold field, which disables the view unless there will be more than the given number of rows. Getting the row count required upgrading term_grid to a version that has that function added.
2017-08-12 20:19:30 +01:00
Benjamin Sago b5bcf22612 Merge remote-tracking branch origin/option-pars-ng
This merges in exa’s own new options parser, which has the following features:

- You can specify an option twice and it’ll use the second one, making aliases usable for defaults (fixes #144)
- Lets arguments be specified more than once (fixes #125)

Strict mode is not done yet; I just wanted to merge this in because it’s been a while, and there’s work that needs to be done on master so I don’t want them drifting apart any further.

It’s likely that you’ll find cases where multiple arguments doesn’t work or where the wrong value is being used. There aren’t tests for *everything* yet, and it still uses global environment variables.

# Conflicts:
#	src/options/view.rs
2017-08-05 21:34:57 +01:00
PJB3005 f249c8528b Use term_size crate to fetch terminal size.
Should be cross-platform, one step closer to Windows support.
2017-08-05 08:09:26 +02:00
Alexandre Erwin Ittner 75a88823d9 Add quick-and-dirty Debian package spec for cargo-deb
That's not a package you can show to your mother, but it makes easier
to install/update/uninstall exa in systems without cargo or rustc.
2017-08-04 11:19:35 -03:00
Benjamin Sago 8d96be7f6a Document the parsing decisions
Even though these can’t actually be viewed with `cargo doc` yet, they’re still good to have around.
2017-07-22 18:06:05 +01:00
Benjamin Sago 8dd9df2e86 Put some metadata in Cargo.toml
For #132. Users had to be updated for the version number.
2017-07-07 11:56:47 +01:00
Benjamin Sago 99e52013b5 Version bump to 0.7.0 2017-07-07 11:47:47 +01:00
Benjamin Sago 84b01f2064 Fix bug where colours were incorrectly applied
exa assumed that the COLUMNS environment variable being present always meant that the output was to a terminal, so it should use colours. But because this variable can be overridden, colours were being incorrectly set!

The ‘fix’ is to stop trying to be clever while only calculating the terminal width once, and instead just stick it in a lazy_static so it’s usable everywhere.
2017-06-25 14:51:44 +01:00
Kevin Ballard 15e08338d8 Remove lazy_static crate
It's not being used anymore.
2017-05-17 22:48:11 -07:00
Benjamin Sago dec445af8f Version bump to 0.6.0 2017-05-18 00:07:22 +01:00
Benjamin Sago c57f480478 One last versions bump 2017-05-17 22:37:20 +01:00
Benjamin Sago 86c19a165c Specify panic="abort"
exa doesn’t capture any failures — it’s not really worth it for such a short-lived task, and doing this results in a smaller binary.

Fixes #128.
2017-05-07 16:47:19 +01:00
Kevin Ballard 08bc2e3e39 Turn off the git networking features
This removes openssl and makes the binary properly self-contained.
2017-05-02 13:54:25 -07:00
Benjamin Sago e5ab15f09c I fixed the build problem! version 0.5.0 2017-04-11 08:11:37 +01:00
Steven Allen 2b2e973ce8 Update dependencies
* Also remove bitflags as it isn't used.
* Don't update ansi_term as ANSIString is no longer Clone.
2017-03-30 12:23:14 -07:00
Ben S 95596297a9 Basic glob ignoring
See #97 and recently #130 too.

This allows the user to pass in options such as "--ignore '*.pyc'" to not list any files ending in '.pyc' in the output. It uses the Rust glob crate and currently does a simple split on pipe, without any escaping, so it’s not really *complete*, but is at least something.
2016-10-30 14:43:33 +00:00
Benjamin Sago 110a1c716b Convert exa into a library
This commit removes the 'main' function present in main.rs, renames it to exa.rs, and puts the 'main' function in its own binary. This, I think, makes it more clear how the program works and where the main entry point is.

Librarification also means that we can start testing as a whole. Two tests have been added that test everything, passing in raw command-line arguments then comparing against the binary coloured text that gets produced.

Casualties include having to specifically mark some code blocks in documentation as 'tests', as rustdoc kept on trying to execute my ANSI art.
2016-04-19 07:48:41 +01:00
Ben S ee4c09dd30 Use only the time zone data present on the system
Thinking about it, it doesn't make sense to use an *external* time zone source when the program we want to compare it to, ls, uses the system one. So just use the system one.

Also, handle the case where the time zone data file can't be loaded by showing the files in UTC rather than falling over and quitting.
2016-03-31 21:19:29 +01:00
Ben S 1dd9e6153b Versions bumps 2016-03-31 20:48:44 +01:00
petevine f8290dfe10 Update Cargo dependencies 2016-03-13 16:12:33 +01:00
Ben S 7f480ab06b Improve system time zone detection 2016-02-10 19:02:20 +00:00
Ben S 75b2748ab1 Update packages to latest versions
- Users v0.5.1, which renames OSUsers to UsersCache
- Locale v0.2, which returns to libc v0.1
- Datetime v0.4.2, which mimics the locale update, and puts timezone definitions in:
- Zoneinfo-data, which is needed to obtain the current timezone
2016-02-10 15:22:43 +00:00
Benjamin Sago c911b5f6e4 Replace Cells with growable TextCells
A recent change to ansi-term [1] means that `ANSIString`s can now hold either
owned *or* borrowed data (Rust calls this the Cow type). This means that we
can delay formatting ANSIStrings into ANSI-control-code-formatted strings
until it's absolutely necessary. The process for doing this was:

1. Replace the `Cell` type with a `TextCell` type that holds a vector of
   `ANSIString` values instead of a formatted string. It still does the
   width tracking.

2. Rework the details module's `render` functions to emit values of this
   type.

3. Similarly, rework the functions that produce cells containing filenames
   to use a `File` value's `name` field, which is an owned `String` that
   can now be re-used.

4. Update the printing, formatting, and width-calculating code in the
   details and grid-details views to produce a table by adding vectors
   together instead of adding strings together, delaying the formatting as
   long as it can.

This results in fewer allocations (as fewer `String` values are produced), and
makes the API tidier (as fewer `String` values are being passed around without
having their contents specified).

This also paves the way to Windows support, or at least support for
non-ANSI terminals: by delaying the time until strings are formatted,
it'll now be easier to change *how* they are formatted.

Casualties include:

- Bump to ansi_term v0.7.1, which impls `PartialEq` and `Debug` on
  `ANSIString`.
- The grid_details and lines views now need to take a vector of files, rather
  than a borrowed slice, so the filename cells produced now own the filename
  strings that get taken from files.
- Fixed the signature of `File#link_target` to specify that the
  file produced refers to the same directory, rather than some phantom
  directory with the same lifetime as the file. (This was wrong from the
  start, but it broke nothing until now)

References:

[1]: ansi-term@f6a6579ba8174de1cae64d181ec04af32ba2a4f0
2015-12-17 08:25:20 +08:00
Ben S e07992d08c Use lazy_static to cache datetime formats
One of those two date formats was re-compiled before any date was displayed. Now they are compiled only the first time they're used, and cached versions are used thereafter, resulting in a speedup.
2015-11-15 19:26:58 +00:00
Ben S cc04d0452f Pin versions to those we know work 2015-11-04 17:01:05 +00:00
Ben S 63bd929eb5 Upgrade to latest ansi_term
Changes to the way ANSIStrings work mean we need to dereference the strings before putting them in an ANSIString. There's more that can be done here, but this gets it to compile for now.
2015-11-03 11:17:44 +00:00
Ben S 8f4a2087e6 Version v0.4.0 2015-10-18 20:34:46 +01:00
Ben S 878d54111d Pin to git2-rs version 0.3
This should prove more stable than relying on a Git version.
2015-10-02 00:56:39 +01:00
Ben S 41fb02a02d Upgrade to latest version of datetime crate
- VariableOffset -> TimeZone::VariableOffset
2015-09-21 00:15:07 +01:00
Ben S d1e682b0c1 Remove pad crate and unnecessary qualifications 2015-09-04 11:20:13 +01:00
Ben S 4e49b91d23 Parallelise the details view!
This commit removes the threadpool in `main.rs` that stats each command-line argument separately, and replaces it with a *scoped* threadpool in `options/details.rs` that builds the table in parallel! Running this on my machine halves the execution time when tree-ing my entire home directory (which isn't exactly a common occurrence, but it's the only way to give exa a large running time)

The statting will be added back in parallel at a later stage. This was facilitated by the previous changes to recursion that made it easier to deal with.

There's a lot of large sweeping architectural changes. Here's a smattering of them:

- In `main.rs`, the files are now passed around as vectors of files rather than array slices of files. This is because `File`s aren't `Clone`, and the `Vec` is necessary to give away ownership of the files at the appropriate point.
- In the details view, files are now sorted *all* the time, rather than obeying the command-line order. As they're run in parallel, they have no guaranteed order anyway, so we *have* to sort them again. (I'm not sure if this should be the intended behaviour or not!) This means that the `Details` struct has to have the filter *all* the time, not only while recursing, so it's been moved out of the `recurse` field.
- We use `scoped_threadpool` over `threadpool`, a recent addition. It's only safely used on Nightly, which we're using anyway, so that's OK!
- Removed a bunch of out-of-date comments.

This also fixes #77, mainly by accident :)
2015-09-02 23:19:10 +01:00
Ben S 8d6f62840a Use term_grid crate for grid formatting
Fixes #39!
2015-06-23 10:54:57 +01:00
Ben S 4c61361bfb Version bump! 2015-06-05 04:00:38 +01:00
Ben S ea3a57eb97 Start using threadpool crate 2015-06-05 03:04:56 +01:00
Ben S cc1d6aa5f1 Display dates with the host's timezone
Fixes #54 using the datetime crate's spiffy new time zone ability.
2015-06-04 15:15:39 +01:00
Ben S 2594690aff Start using the libc crate from crates.io 2015-05-16 13:17:50 +01:00
Ben S 41aadaeab4 Re-implement no-longer-missing metadata fields 2015-05-03 12:46:05 +01:00
Ben S d7d11f77f3 Use unicode_width crate 2015-04-23 13:46:37 +01:00
Benjamin Sago f885568145 Upgrade to latest Rust
Still missing a few Beta features, but it compiles!

- Copy requires Clone
- current_dir returns a Path now
- num_cpus moved to a crate
2015-04-04 00:14:56 +02:00
Ben S 697e1e66e4 Versions bump for latest Rust
- Changes to users crate
2015-03-26 00:35:39 +00:00
Ben S 67f60e614b Add --version command (and bump version) 2015-03-02 14:54:38 +00:00
Ben S 6b3d812af5 Use development version of libgit2-rs
This stops the openssl-sys version clash preventing exa from compiling.
2015-03-02 01:58:39 +00:00
Steven Allen 88b86b6123 Enable lto in release versions.
lto makes exa slightly faster and much smaller. I specify the other
options to make them explicit.

Note: lto makes compiling take quite a bit longer.
2015-02-22 20:05:21 -05:00
Michael Faille 2701c20a36 FIX bitflags depedency 2015-02-21 17:59:38 -05:00
Ben S d180a5f5e4 Use ansi_term's awesome new continuation colours 2015-02-13 21:24:10 +00:00
Ben S ec51867a53 Upgrade to latest Rust
- Update package versions
- locale::default -> locale::english
- Argument handling changes
2015-02-12 22:33:01 +00:00
Ben S 2906b8676a Translate month names into the user's locale
This has been mostly done with changes in the datetime crate's suddenly
supporting locales.

It's still important that the user's locale is touched only once and
cached from that point on, so a struct in output::details has been made
public, along with that module. This will change later as that object
gains more and more uses thoughout the codes.
2015-02-10 18:14:56 +00:00
Ben S 21ac16f808 Format file size in bytes with the user's locale
Use the `locale` crate as a dependency to read in the set
thousands-separator character, and pass this to the file size column,
which uses it to add the separators in.

en_GB uses ","
fr_FR uses "" and just displays the numbers in one go.
2015-02-10 16:08:10 +00:00
Ben S 9dbca5f12a Use specified version of datetime
This prevents crates.io from doing weird things from a circular depedency, which is probably my fault.
2015-02-09 23:51:26 +00:00
Ben S 131dd606da Fix Travis tests
It kept on using 0.1.1, which didn't actually compile.
2015-02-09 21:46:34 +00:00
Ben S 924416d8fb Actually use the public datetime crate... 2015-02-09 19:40:49 +00:00
Ben S 0d25a90ef1 Initial work on date/time columns for files
Using the datetime crate, add an extra column to the --long view that
prints out the modified, accessed, or created timestamp for each file.
Also, let the user pick which one they want to see based on the --time
command-line option.
2015-02-09 16:33:27 +00:00
Ben S 0f1843f5e7 Use latest, working version of ansi_term crate 2015-02-04 14:51:25 +00:00
Ben S 815ec8a4ab Update to most recent versions of libraries 2015-02-04 01:34:21 +00:00
Ben S 6d4b30d531 Code changes in preparation for recursion 2015-01-31 16:10:40 +00:00
Ben S f6cbfc7276 Support Git by default 2015-01-27 16:03:26 +00:00
Ben S 90d4684de4 Preliminary Git support!
This is something that I've long wanted to add. It uses libgit2 as an optional dependency.
2015-01-27 15:01:17 +00:00
Benjamin Sago 1c5409e253 Upgrade to Rust alpha
- uint -> usize
- getopts Cargo library
- replace feature gates with unstable APIs
2015-01-12 01:31:24 +01:00
Benjamin Sago 2784baea0a Switch to Crates dependencies format 2015-01-12 01:20:28 +01:00
Ben S 24628f97be Use number_prefix crate for number prefixes 2014-12-18 07:00:31 +00:00
Ben S 65f124fe39 Use the natord library instead of our own sorter
I'm serious, the more functionality I can use external crates for, the better.
2014-12-12 11:26:18 +00:00
Ben S 6770ac5475 Replare Unix module with users crate
Feels good turning all that code into a dependency!
2014-12-12 11:17:55 +00:00
Ben S d2647df0ca Move some stuff out to rust-ansi-term crate 2014-07-01 19:00:36 +01:00