Commit Graph

776 Commits

Author SHA1 Message Date
Benjamin Sago
c39a57294c Versions bump 2015-12-15 21:38:56 +00:00
Benjamin Sago
47b088d662 Merge pull request #87 from petevine/master
Fix compilation on arm using stable rust 1.5
2015-12-15 20:15:16 +00:00
Benjamin Sago
f2143d948c Merge pull request #89 from jbeich/freebsd
Minor fixes for FreeBSD
2015-12-15 20:12:36 +00:00
Jan Beich
92328d9093 Move CString to where it's actually used
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;
                           ^~~~~~~~~~~~~~~~~
2015-12-14 03:13:40 +00:00
Jan Beich
b35927f247 Fix logic inversion with --git in --help
$ 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
[...]
2015-12-14 04:11:03 +03:00
Jan Beich
b9eb364823 Fix getting tty window size on more BSDs
src/term.rs:37:39: 37:49 error: unresolved name `TIOCGWINSZ` [E0425]
src/term.rs:37     let result = ioctl(STDOUT_FILENO, TIOCGWINSZ, &mut window);
                                                     ^~~~~~~~~~
2015-12-14 04:10:46 +03:00
petevine
734c5084ba Update xattr.rs 2015-12-11 05:50:20 +01:00
Ben S
f3e6a99676 Update screenshots
GitHub's new, wider view makes two screenshots side-to-side look nicer than one.
2015-11-23 19:48:30 +00:00
Ben S
5cd1d6a13c Update readme with latest option set 2015-11-19 13:21:49 +00:00
Ben S
d89307bc43 Replace missing man page fields 2015-11-19 13:21:31 +00:00
Ben S
1756a0a841 Fix bug where details view needed a terminal width
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.
2015-11-19 12:47:53 +00:00
Ben S
41905eaba4 Add new, pandoc-powered man page
This also includes some of the options that I forgot existed. Don't be mad.
2015-11-19 12:42:30 +00:00
Ben S
f92459d957 Add --colo[u]r options
The user can now control the output parameters by specifying the console width and when to show colours.

Fixes #75.
2015-11-19 12:31:43 +00:00
Ben S
c543e61ced Improve code in two insignificant little places 2015-11-19 12:19:04 +00:00
Ben S
9218799e6e Upgrade versions to working ones 2015-11-18 18:32:40 +00:00
Ben S
ceae7e747c Rearrange trait definitions in options
This puts the impls for the structs defined in the module first, then impls for the structs defined in the columns module second.
2015-11-15 21:04:48 +00: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
021655faec Merge branch 'better-options' 2015-11-15 18:37:18 +00:00
Ben S
edeec0f6f2 Improve help text
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...
2015-11-15 17:18:02 +00:00
Ben S
590fb9cd60 Move time type picking to details module
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.
2015-11-15 16:12:16 +00:00
Ben S
ca65c981f1 Avoid cloning the file names vector
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.
2015-11-15 15:52:55 +00:00
Ben S
2efaf7ec45 Options and FileFilter are also deducible
We may as well use this trait now that it’s available!
2015-11-15 15:07:19 +00:00
Ben S
534d3c3fa5 Extract 'bad argument' method 2015-11-15 00:02:39 +00:00
Ben S
8b9f074d63 Inline SortField::from_word
With the new OptionSet trait, the from_word constructor doesn't really do much by itself.
2015-11-14 23:47:13 +00:00
Ben S
10468797bb Move many Options structs to the output module
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.
2015-11-14 23:32:57 +00:00
Ben S
cc04d0452f Pin versions to those we know work 2015-11-04 17:01:05 +00:00
Benjamin Sago
caf5fce1e8 Merge pull request #85 from skade/move-to-stable
Move to stable
2015-11-04 16:31:05 +00:00
Florian Gilcher
30e4eb8b06 Fixup README version constraint 2015-11-04 16:27:51 +01:00
Florian Gilcher
c32ebdb904 Remove the other reference to nightly 2015-11-04 16:02:47 +01:00
Florian Gilcher
48d1e5164c Move file mode constants to a private module 2015-11-04 15:56:37 +01:00
Florian Gilcher
d083d26eaf Fix tree output 2015-11-04 15:22:51 +01:00
Florian Gilcher
77fa8974c4 Fixup: split prefix tests by property 2015-11-04 11:39:01 +01:00
Florian Gilcher
ad39d6e282 Test on nightly, beta and stable 2015-11-04 11:29:29 +01:00
Florian Gilcher
5556c6a40b Update README 2015-11-04 11:12:20 +01:00
Florian Gilcher
7a97b7d40c Reserve Vector elements instead of resizing 2015-11-04 11:07:31 +01:00
Florian Gilcher
7f53da73b7 Use slicing instead of future slice_last 2015-11-04 11:07:08 +01:00
Florian Gilcher
e8ea96ee86 Avoid unstable c_string conversion features 2015-11-04 10:25:20 +01:00
Florian Gilcher
b3e3825417 Replace unstable fs_mode by internal constants 2015-11-04 09:51:34 +01:00
Florian Gilcher
679b9e18b2 Replace sum call by stable fold(0, Add::add) 2015-11-04 09:41:49 +01: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
bc47073281 Feature slice_splits and vec_resize stabilised
As of rustc 1.6.0-nightly (1a2eaffb6 2015-10-31), anyway.
2015-11-03 11:16:19 +00:00
Ben S
1bebab78d0 Upgrade Rust version necessary 2015-10-30 10:40:56 +00:00
Ben S
8f4a2087e6 Version v0.4.0 2015-10-18 20:34:46 +01:00
Ben S
cfc8df12b6 Update the version of Rust that's required 2015-10-02 01:04:07 +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
f7131a740b Fix warning when building on 64-bit systems
This warning was 'caused' by the previous commit (but it's small and easy to fix, so don't worry)
2015-10-02 00:56:09 +01:00
Ben S
9b3b00316f Merge pull request #81 from rhysd/fix-32bit
Fix integer length error on 32bit environment
2015-10-02 00:54:37 +01:00
rhysd
3dbc441c78 Fix integer length error on 32bit environment
this commit fixes below type mismatch error:

```
src/output/details.rs:585:49: 585:60 error: mismatched types:
 expected `i64`,
    found `i32`
(expected i64,
    found i32) [E0308]
src/output/details.rs:585         let date = self.tz.at(LocalDateTime::at(timestamp.0));
                                                                          ^~~~~~~~~~~
src/output/details.rs:585:49: 585:60 help: run `rustc --explain E0308` to see a detailed explanation
error: aborting due to previous error
Could not compile `exa`.
```
2015-09-28 11:42:52 +09:00
Ben S
41fb02a02d Upgrade to latest version of datetime crate
- VariableOffset -> TimeZone::VariableOffset
2015-09-21 00:15:07 +01:00
Benjamin Sago
3d3acc2e93 Dismiss some compile-time warnings
The `unused_results` lint was complaining that the results of inserting into a `MockUsers` object weren't being inspected. These are mock users, so all that would be returned is `None` to indicate that they weren't already in the table -- they're fine to ignore! So, suppress the warnings for those two testing modules.
2015-09-15 20:05:27 +01:00