2014-06-28 16:24:20 +00:00
|
|
|
[package]
|
|
|
|
name = "exa"
|
2015-10-18 19:34:46 +00:00
|
|
|
version = "0.4.0"
|
2014-06-28 16:24:20 +00:00
|
|
|
authors = [ "ogham@bsago.me" ]
|
|
|
|
|
|
|
|
[[bin]]
|
2014-07-01 18:00:36 +00:00
|
|
|
name = "exa"
|
|
|
|
|
2015-01-12 00:20:28 +00:00
|
|
|
[dependencies]
|
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 00:25:20 +00:00
|
|
|
ansi_term = "0.7.1"
|
2015-04-23 12:46:37 +00:00
|
|
|
bitflags = "0.1"
|
2015-09-20 23:15:07 +00:00
|
|
|
datetime = "0.4.1"
|
2015-11-04 17:01:05 +00:00
|
|
|
getopts = "0.2.14"
|
2015-11-15 19:26:58 +00:00
|
|
|
lazy_static = "0.1.*"
|
2015-11-04 17:01:05 +00:00
|
|
|
libc = "0.2.0"
|
2015-02-10 18:14:56 +00:00
|
|
|
locale = "0.1.2"
|
2015-02-04 01:34:21 +00:00
|
|
|
natord = "1.0.7"
|
2015-11-04 17:01:05 +00:00
|
|
|
num_cpus = "0.2.7"
|
2015-02-04 01:34:21 +00:00
|
|
|
number_prefix = "0.2.3"
|
2015-11-15 19:26:58 +00:00
|
|
|
scoped_threadpool = "0.1.*"
|
2015-11-04 17:01:05 +00:00
|
|
|
term_grid = "0.1.2"
|
|
|
|
unicode-width = "0.1.3"
|
|
|
|
users = "0.4.3"
|
2015-01-27 15:01:17 +00:00
|
|
|
|
|
|
|
[features]
|
2015-01-27 15:59:22 +00:00
|
|
|
default = [ "git" ]
|
2015-01-27 15:01:17 +00:00
|
|
|
git = [ "git2" ]
|
|
|
|
|
2015-02-23 01:05:21 +00:00
|
|
|
[profile.release]
|
|
|
|
opt-level = 3
|
|
|
|
debug = false
|
|
|
|
lto = true
|
|
|
|
|
2015-01-27 15:01:17 +00:00
|
|
|
[dependencies.git2]
|
2015-11-04 17:01:05 +00:00
|
|
|
version = "0.3.2"
|
2015-02-09 16:33:27 +00:00
|
|
|
optional = true
|