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.
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.)
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.
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.
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”
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.
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.
You could use src/*.rs src/*/*.rs src/*/*/*.rs,
but explicit listing is prefered.
Ideally, you should be separate object files that
are rebuilt only when necessary, and then build
the final binary from those. But have not looked
at how to compile rust code so I don't know how
to do that, and since there are no header files
that is also probably suboptimal.
Signed-off-by: Mattias Andrée <maandree@kth.se>
Let the package manager do it. You don't want to
force stripping, the symbols are useful for debugging.
Signed-off-by: Mattias Andrée <maandree@kth.se>
You need cargo, not rustc, and cargo requires rustc,
so checking for rustc is incorrect. And the user will
know that she needs cargo when the command cannot be
find, so why look for it and add extra dependenices
just for that.
Signed-off-by: Mattias Andrée <maandree@kth.se>
Use quotes to support spaces and such.
Use -- to support dashes.
And most important:
Use DESTDIR to support installing into a staging directory.
This is useful for packaging and verifying the install.
Signed-off-by: Mattias Andrée <maandree@kth.se>