Commit Graph

625 Commits

Author SHA1 Message Date
Benjamin Sago e5ab15f09c I fixed the build problem! version 0.5.0 2017-04-11 08:11:37 +01:00
Benjamin Sago 1a6066327d Fix a merge mistake
The last PR was meant to remove the duplicate bitflags, but I think I messed it up and another one crept in.
2017-04-02 03:24:06 +01:00
Benjamin Sago 23ab19eb20 Merge pull request #147 from spk/use-official-jessie64
Use official vagrant jessie64
2017-04-02 02:33:39 +01:00
Benjamin Sago 59c4120e6a Merge pull request #149 from Stebalien/update-deps
Update dependencies
2017-04-02 02:31:50 +01:00
Benjamin Sago 22b593d159 Merge branch 'master' into update-deps 2017-04-02 02:31:36 +01:00
Benjamin Sago f1be6b89d5 Merge pull request #146 from spk/fix-exit-status
Exit with a non-zero status on error
2017-04-02 02:25:31 +01:00
Benjamin Sago 98f0326d9e Merge pull request #145 from spk/update-git2
Update git2 to 0.6.4
2017-04-02 02:24:05 +01:00
Laurent Arnoud 8b61a3a0f2
Exit with a non-zero status on error
With `ls` from Debian coreutils 8.26-2

```
ls /bad/path
echo $? # => 2
```

Reproduced same behaviour with exa

Fix https://github.com/ogham/exa/issues/135
2017-04-01 00:10:49 +02:00
Laurent Arnoud 3fa3ae1595
Install pkg-config for openssl-sys 2017-04-01 00:08:41 +02:00
Laurent Arnoud 2960ec91d4
Update git2 to 0.6.4 2017-04-01 00:08:31 +02: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
Benjamin Sago 3bce55f569 Run Untry over the entire source tree 2017-03-26 17:35:50 +01:00
Benjamin Sago c66a947a74 The first versions bump in AGES 2017-03-26 17:03:24 +01:00
Laurent Arnoud 1447cf53bf
Use official vagrant jessie64 2017-02-26 13:31:43 +01:00
Ben S 0ffb331976 Wire up the colour-scale option 2016-10-30 16:42:33 +00:00
Ben S 86065f832d File size colours on a scale
This adds an option (always on at the moment) to use a colour scale of green to yellow to orange for the file size field instead of always green. See #65.
2016-10-30 15:50:09 +00:00
Ben S 91e8ef5c78 Prepare to make the size colour take an argument
This makes the Colours value pick a colour based on the size of the file, instead of necessarily having them all green. (They are all green for now, though.)
2016-10-30 15:09:36 +00:00
Ben S 93f8ad27dc Remember to add ignore-glob to the help 2016-10-30 14:47:38 +00: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
Ben S a6712994c5 Make the views non-Copy
This has to be done for when ignore patterns get introduced and have to be stored in a Vec.
2016-10-30 14:31:25 +00:00
Ben S bd2a76b447 Fix integration test by making it time-independent 2016-10-30 14:27:20 +00:00
Ben S 74358c188a Properly handle errors when following a symlink
Fixes #123. The code assumes that every File that has its link_target() method called would first have been checked to make sure it’s actually a link first. Unfortunately it also assumed that the only thing that can go wrong while following a link is if the file wasn’t a link, meaning it crashes when given a link it doesn’t have permission to follow.

This makes the file_target() method able to return either a file or path for displaying, as before, but also an IO error for when things go wrong.
2016-10-29 20:27:23 +01:00
Ben S ba366fc855 Add some symlink testcases 2016-10-29 19:58:34 +01:00
Ben S dcc17b1d15 This lint flag started to cause all kinds of fuss 2016-10-29 19:52:21 +01:00
Ben S 36d9b6844e Add .tgz to the compressed file extensions
Fixes #129
2016-10-29 19:28:41 +01:00
Ben S 9589496aac Write some file-type integration tests 2016-10-29 19:28:20 +01:00
Ben S a7e3456b0d Only engage the view when there are files to show
This changes the way that views are used to display the actual lists of files. It used to pass empty vectors to the view methods, which most of the time would not print anything because there are no files to list — except when there’s a header row which gets printed for no files.

By not calling the view method at all when there’s nothing to print, exa won’t ever print extra things in the view unless it needs to for a file.

This fixes #106 “Don’t print the header if the result set is empty”
2016-10-29 19:07:43 +01:00
Benjamin Sago 54067bf765 Replace the testcases script with a Vagrant VM
See the README section for more details. Basically, with this way, we can store a bunch of existing valid exa outputs, change a VM's environment to match our values, then check that exa still works by comparing outputs.
2016-10-07 19:31:03 +01:00
Benjamin Sago d321434a47 Versions bump. Oh, and checksums! 2016-10-05 18:50:29 +01:00
Benjamin Sago 6d3e6b7cad Merge pull request #122 from quodlibetor/include-legal-args-in-error-messages
Add legal values to error messages
2016-10-05 16:48:55 +01:00
Benjamin Sago a8b05fce83 Merge pull request #119 from gemmarx/use_stderr
Change to put error messages into stderr
2016-10-05 16:47:51 +01:00
Benjamin Sago 3f81300e21 Merge pull request #118 from gemmarx/ignore_brokenpipe
Change to ignore broken pipe error
2016-10-05 16:47:22 +01:00
Brandon W Maister 7e15e0dd49 Add legal values to error messages
Now when you do `--sort time` instead of saying "unknown option --sort
time" it will say "unknown options '--sort time' (choices: name...)"
with all legal options.

This also adds the legal values to the default help text.
2016-08-28 21:56:32 -04:00
Gemmarx 8d25719b6b Change to put error messages into stderr 2016-07-31 04:12:03 +09:00
Gemmarx 943ac87466 Change to ignore broken pipe error 2016-07-30 22:53:11 +09:00
Benjamin Sago 6522337463 Merge pull request #114 from Lindenk/unix_types
Exa now recognizes pipes, devices, and sockets on unix systems
2016-07-02 14:52:58 +01:00
Linden Krouse a9bb275250 Exa now recognizes pipes, devices, and sockets on unix systems. Fixes #112 2016-06-13 23:14:36 -04:00
Ben S b8191670c7 Fix, and add tests for, slashes in link paths 2016-06-11 16:54:06 +01:00
Ben S 580ad0cfec Stop Travis from getting hung up on read 2016-06-11 14:12:38 +01:00
Ben S 921f3ca37c Make xattr tests optional for Travis 2016-06-11 14:06:43 +01:00
Ben S 5f01ff02fa Split tests into one file per test directory 2016-06-11 13:57:33 +01:00
Ben S 331d5ea724 Rename underscored lifetimes
See https://github.com/rust-lang/rfcs/pull/1177
2016-06-11 13:35:40 +01:00
Benjamin Sago 50c0c36b6b Update homepage link 2016-05-24 09:03:16 +01:00
Benjamin Sago 069908adb6 Merge pull request #111 from hoodie/master
Fix building without default features
2016-05-24 09:01:26 +01:00
Hendrik Sollich c2d42e7d84 Fix building without default features 2016-05-03 00:03:22 +02:00
Benjamin Sago 299289d76f Fix the Travis build
The tests, as I so clearly wrote a comment to indicate, can only be run after the script to generate the testcases has been run...
2016-04-26 17:54:23 +01: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
Benjamin Sago a02f37cb45 Change views to print to a Writer, not stdout
This will mean that we can test exa's output as a whole, without having to rely on process or IO or anything like that.
2016-04-18 18:39:32 +01:00
Benjamin Sago 476406f43b Remove unused argument 2016-04-17 21:01:30 +01:00
Benjamin Sago 78ff651326 Remove unnecessary .to_string()s from option tests 2016-04-17 20:56:06 +01:00