Commit Graph

638 Commits

Author SHA1 Message Date
Benjamin Sago
ef18f9ca91 Protect xtests against different default users
The Vagrant tests assumed that there’d be a user called “vagrant” that would run the tests and create the files by default. Files would be owned by vagrant:vagrant by default, and this worked, until it came time to change that username. The naïve method was a search-and-replace, but this caused problems when the new user’s name wasn’t exactly the same length as the previous one.

So to fix this, we now have our own user, named after the first animal I thought of, that makes the files’ owners and groups independent of the default user of whichever VM image the xtests are running on.

Another place where it was hard-coded was the home directory, which was “/home/vagrant”, where the awkward testcases live. That last one has been changed to just “/testcases”, which has no mention of the user in it.
2017-04-28 19:34:23 +01:00
Benjamin Sago
b885b34aa6 Protect xtests against the passage of time
There was a problem with the Vagrant tests where the year 2016 was hard-coded in as the modified date. This had to be done to make the --long tests use the correct date format, which varies depending on whether the timestamp is in the current year.

Unfortunately, time progresses [citation needed], and what was once 2016 is now 2017, so the date format changed and the tests broke.

Because the Vagrantfile is just a Ruby script, we can look up the current year at runtime and use that instead. There’s also a check added to the test runner that makes sure none of the files are more than 365 days old, because if any are, then it’s time to update the timestamps (or it’s the last day of a leap year)
2017-04-28 19:26:57 +01:00
Benjamin Sago
2ba4e99251 Versions bump 2017-04-28 18:13:39 +01:00
Benjamin Sago
b3957a2909 Merge pull request #162 from raphink/filetypes
Add cr2 as image
2017-04-26 21:23:33 +01:00
Raphaël Pinson
8ac68f9964
Add cr2 as image 2017-04-19 00:08:29 +02:00
Benjamin Sago
3087565c01 Merge pull request #154 from neosilky/clippy-fixes
Fix some issues indicated by clippy
2017-04-11 08:18:55 +01:00
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
Daniel Lockyer
cc4a65ac4b Remove lifetimes as they aren't needed 2017-03-31 17:12:20 +01:00
Daniel Lockyer
79b4f1a6ee Switch to better handling method 2017-03-31 17:12:01 +01:00
Daniel Lockyer
ec84f16da7 Collapse down similar branches of match-statement 2017-03-31 17:11:49 +01:00
Daniel Lockyer
91459d608c Replace double-quote with single-quote 2017-03-31 17:10:18 +01:00
Daniel Lockyer
b68627ce1a Switch to padding reference as variable not consumed 2017-03-31 17:09:50 +01:00
Daniel Lockyer
e059fb5ba7 Remove unnecessary reference 2017-03-31 17:09:32 +01:00
Daniel Lockyer
da3061d1b3 Replace use of .iter() with reference 2017-03-31 17:08:11 +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
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