Commit Graph

89 Commits

Author SHA1 Message Date
Benjamin Sago
5683b5796e
Merge branch 'master' into cargo-deb-spec 2020-01-18 22:41:53 +00: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