It doesn't seem right to use the EXIT_SUCCESS constant in one place, and a hard-coded 2 in another. What if they overlap?
Changing the success value to 0 should be OK, though, because the standard defines 0 as success, regardless of whether EXIT_SUCCESS is 0 or not.
Also, the values have become i32s. The Rust function std::process::exit takes an i32, so there's not much point using anything else.
Using the cargo-hack command, which now gets installed in the Vagrant environment, there's now an easy way to make sure exa can be built and test with all combinations of features.
There have been times in the past where exa has failed to build without the git feature, and I've just never noticed. This should put a stop to that.
This commit deletes the Makefile, which contained targets to build exa and install it on the local machine, and replaces it with a Justfile, which only contains command to build and test exa.
My reasoning for doing this is as follows:
• exa is increasingly being installed through package managers, rather than built and tested locally, so users are avoiding using the Makefile at all.
• It was a pain to keep up with the correct paths for installing the binary, man pages, and completions, which can vary between OSes. By removing them, the code in this repository need only concern itself with building exa and putting its files in the 'target' directory, simplifying things.
• just is much simpler than make conceptually, which is why I prefer it. It just runs commands, rather than being a complete build system, which we already use Cargo for.
• just has features built-in, such as listing tasks, that we've had to create make targets for.
• exa only needed a Makefile at all because it pre-dates Cargo!
• Other Rust projects seem to be getting along perfectly fine without one.
If I've missed some important reason that makes it worth keeping the Makefile around then please let me know.
• Get rid of the 'fresh' VM. It just got in the way, taking up more memory when 'vagrant up' was used, and only solved one problem that was happening three years ago when I was at RustFest and in a programm-y mood.
• Use a more up-to-date Ubuntu image and give the machine more cores.
• Start moving some of the developer tools out of this repo. As I get more and more Rust projects, I don't want the scripts to package them to be repeated in each repository.
This was an unintended consequence of #653. The Files iterator stopped using IgnoreCache and started using GitCache, which would always populated when the `--git` option was passed, without checking whether files were meant to be ignored. This meant that passing `--git` started ignoring files even without `--git-ignore`.
The solution for now is to explicitly pass the flag around, which probably should be a better type than bool but isn't. This makes the git-ignoring-related extended tests pass.
Instead of defaulting immediately to /etc/filename for the timezone, we can first check whether the TZ environment variable is set. If so, we can pull the corresponding timezone file from /usr/share/zoneinfo. Closes#453.
Using --octal_permissions will insert another column before the existing
permissions where permissions are encoded using octal values as
requested in #316
Added the following imemdiate file types for PHP:
- `composer.json` for [Composer](https://getcomposer.org/), the defactor standard package manager for PHP;
- `RoboFile.php`, for [Robo](https://robo.li/), the PHP task runner.
Note: [Phing]() uses `build.xml`, which was already included in the list.
Previously if a timestamp was unavailable, it defaulted to the epoch.
Prior to this it defaulted to a zero duration.
Switch to an Option<SystemTime> and move the handling of unavailable
timestamps to rendering.
Fix an off-by-one on the seconds when subseconds are present, and
correct display of nenoseconds, which are of course inverted due to the
internal value being negative.
Instead of returning a Duration since the epoch from file metadata,
which cannot represent times before it, return the SystemTime directly.
Move conversion closer to where it's needed, and perform it infallibly.