- 22 12月, 2015 1 次提交
-
-
由 Benjamin Sago 提交于
1. imports from std 2. imports from external crates 3. imports from local modules 4. imports from self
-
- 20 12月, 2015 1 次提交
-
-
由 Benjamin Sago 提交于
This commit moves the colours module to be a sub-module of the output one. This makes sense because finding which colour a certain file should be is only done during output, and (I think) the only places that the `Colours` struct's fields are ever queried is from the output module. The only casualty was that the `file_colour` from the filetype module had to be moved, as determining colours is no longer part of that module - only determining filetype is. So it now reflects its name!
-
- 17 12月, 2015 5 次提交
-
-
由 Benjamin Sago 提交于
The benefit of this is that it make it possible to convert text cell contents vectors into text cells with a method (see next commit). Casualties include having to call `.into()` on vectors everywhere, which I'm not convinced is a bad thing.
-
由 Benjamin Sago 提交于
Because, strictly speaking, it's not a length, it's a width! Also, re-order some struct constructors so that they're no longer order-dependent (it's no longer the case that a value will be borrowed for one field then consumed in another, meaning they have to be ordered in a certain way to compile. Now the value is just worked out beforehand and the fields can be specified in any order)
-
由 Benjamin Sago 提交于
By removing the `File#file_name_width` method, we can make the file module have no dependency on the output module -- in other words, the model (file) and the view (output) are now separate again!
-
由 Benjamin Sago 提交于
This commit introduces the `output::cell::DisplayWidth` struct, which encapsulates the Unicode *display width* of a string in a struct that makes it less easily confused with the *length* of a string. The use of this type means that it's now harder to accidentally use a string's length-in-bytes as its width. I've fixed at least one case in the code where this was being done! The only casualty is that it introduces a dependency on the output module from the file module, which will be removed next commit.
-
由 Benjamin Sago 提交于
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
-
- 16 12月, 2015 4 次提交
-
-
由 Benjamin Sago 提交于
-
由 Benjamin Sago 提交于
-
由 Benjamin Sago 提交于
Fix compilation on arm using stable rust 1.5
-
由 Benjamin Sago 提交于
Minor fixes for FreeBSD
-
- 14 12月, 2015 3 次提交
-
-
由 Jan Beich 提交于
src/feature/xattr.rs:6:5: 6:22 warning: unused import, #[warn(unused_imports)] on by default src/feature/xattr.rs:6 use std::ffi::CString; ^~~~~~~~~~~~~~~~~
-
由 Jan Beich 提交于
$ exa --help [...] -@, --extended display extended attribute keys and sizes $ exa -@ Unrecognized option: '@'. $ exa --extended Unrecognized option: 'extended'. $ exa --git Option --git is useless without option --long. $ exa -l --git .rw-r--r-- 11k user 10 Dec 18:26 -- Cargo.lock [...]
-
由 Jan Beich 提交于
src/term.rs:37:39: 37:49 error: unresolved name `TIOCGWINSZ` [E0425] src/term.rs:37 let result = ioctl(STDOUT_FILENO, TIOCGWINSZ, &mut window); ^~~~~~~~~~
-
- 11 12月, 2015 1 次提交
-
-
由 petevine 提交于
-
- 24 11月, 2015 1 次提交
-
-
由 Ben S 提交于
GitHub's new, wider view makes two screenshots side-to-side look nicer than one.
-
- 19 11月, 2015 7 次提交
-
-
由 Ben S 提交于
-
由 Ben S 提交于
-
由 Ben S 提交于
The buggy code assumed that, if output isn't to a terminal, then the only view available is the Lines view. This is incorrect, as the Details view doesn't require a set width either, so check for --long even when there's no set width.
-
由 Ben S 提交于
This also includes some of the options that I forgot existed. Don't be mad.
-
由 Ben S 提交于
The user can now control the output parameters by specifying the console width and when to show colours. Fixes #75.
-
由 Ben S 提交于
-
由 Ben S 提交于
-
- 16 11月, 2015 5 次提交
-
-
由 Ben S 提交于
This puts the impls for the structs defined in the module first, then impls for the structs defined in the columns module second.
-
由 Ben S 提交于
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.
-
由 Ben S 提交于
-
由 Ben S 提交于
Instead of using the getopts crate’s dynamically-generated usage string, use a more static one: - The options are organised by category now - You can use `--help --long` to display only the ones that pertain to `--long` - They’re aligned in a table sort of way It could be generated statically, because all the options to change it are determined at compile time, but they’re not, yet...
-
由 Ben S 提交于
Technically speaking, picking which timestamp to show for a file is a function of an output module, rather than the file itself. This also means that the `output::column` and `file` modules are now completely separate.
-
- 15 11月, 2015 5 次提交
-
-
由 Ben S 提交于
By taking the file names as a mutable vector, we can avoid having to allocate a new one when it’s empty. The recent changes to Options::getopts have made it more obvious that we could move the same vector out of getopts’s matches, instead of cloning it there.
-
由 Ben S 提交于
We may as well use this trait now that it’s available!
-
由 Ben S 提交于
-
由 Ben S 提交于
With the new OptionSet trait, the from_word constructor doesn't really do much by itself.
-
由 Ben S 提交于
This cleans up the options module, moving the structs that were *only* in use for the columns view out of it. The new OptionSet trait is used to add the ‘deduce’ methods that used to be present on the values.
-
- 05 11月, 2015 2 次提交
-
-
由 Ben S 提交于
-
由 Benjamin Sago 提交于
Move to stable
-
- 04 11月, 2015 5 次提交
-
-
由 Florian Gilcher 提交于
-
由 Florian Gilcher 提交于
-
由 Florian Gilcher 提交于
-
由 Florian Gilcher 提交于
-
由 Florian Gilcher 提交于
-