Commit Graph

351 Commits

Author SHA1 Message Date
Ben S
8139cfedea Fewer warnings when testing 2015-02-26 07:42:37 +00:00
Ben S
f9f1c991cb details: filter is only used when recursing
So move it as part of 'recurse's option.
2015-02-26 07:26:04 +00:00
Ben S
abf7bf7a3e We don't use plugin anymore 2015-02-26 07:18:18 +00:00
Ben S
134f9fc252 Refactor details view
Move most of the heavy lifting into a Table struct, which doesn't govern how the resulting table is *created*, only how it's *displayed*.
2015-02-26 07:18:08 +00:00
tuftedocelot
e86369ba1b Update PKGBUILD to current version in AUR 2015-02-25 12:26:13 -06:00
tuftedocelot
085b71cf07 Add PKGBUILD to contrib
Create a contrib folder for optional extras
2015-02-25 12:22:58 -06:00
Ben S
3e6cce5b5c Merge pull request #35 from davidcelis/makefile
Add simple Makefile to build and install exa
2015-02-24 16:26:11 +00:00
Ben S
9974d4d5a2 Merge branch 'max-depth'
See #24.
2015-02-24 16:20:21 +00:00
Ben S
93b17a6308 Add extra special error for --level 2015-02-24 16:19:56 +00:00
Ben S
17657100b4 Fix bug where the wrong level was used for . dir 2015-02-24 16:08:22 +00:00
Ben S
cbc3640ced Remove debugging print
Everybody does it, right?
2015-02-24 16:07:31 +00:00
Ben S
f505bdc869 Add --level option to limit tree and recursion 2015-02-24 16:05:25 +00:00
David Celis
714b9c1fbe Add simple Makefile to build and install exa
This patch adds a Makefile that will build and install exa along with
its recently added manual page. This provides a little bit of a nicer
installation path while we wait for Cargo to, hopefully, provide its own
built-in installation method for packages that contain binaries.

Signed-off-by: David Celis <me@davidcel.is>
2015-02-24 10:48:39 -05:00
Ben S
0cb721a644 Merge pull request #31 from davidcelis/man-page
Add a man page entry for exa
2015-02-24 11:53:18 +00:00
Ben S
ef58c30bc7 Merge pull request #34 from jgilchrist/master
Fix a missing '/' in symlink targets
2015-02-24 11:46:57 +00:00
Jonny Gilchrist
96cab9cd05 Fix a missing '/' in symlink targets
In cases where symlink targets were more than a single directory down,
exa did not print the '/' targets when separating directories, resulting
in the following output:

    symlink => dirAdirBdirC/file

Instead of

    symlink => dirA/dirB/dirC/file

By adding a '/' character after each component of the filename, this
error is fixed.
2015-02-24 03:28:34 +00:00
David Celis
def48dc6b9 Add a man page entry for exa
This patch adds a manual page that can be parsed and outputted by the
`man` command. The help command is useful, but many UNIX users have a
certain reflex to check for manual pages. It would be awesome to be able
to type `man exa` and see some output! Some notes:

 * This manual page was hand crafted. I had hoped to find some Rust
   utility that could generate manual pages to prevent having to change
   this file whenever changes to options are made. There are tools to
   write manual pages in a nicer syntax and then convert them into the
   groff syntax, but I hesitated to add more tools to the build process.
   This might make the file more difficult to maintain, but unless exa's
   signature changes frequently, it should be okay.
 * The manual page isn't automatically copied into the
   /usr/local/share/man/man1 directory, where it would need to be for
   `man` to read it. My first inkling to have installation be a nice
   process would be to craft a Makefile that will run `cargo build
   --release`, copy the binary into /usr/local/bin, and copy the man
   page into the aforementioned directory. I can handle that in this PR
   or another one if you like the idea of a Makefile to ease
   installation!

Signed-off-by: David Celis <me@davidcel.is>
2015-02-23 13:42:23 -05:00
Ben S
ea1b3caefa Allow --tree without --recurse
See #24
2015-02-23 16:08:51 +00:00
Ben S
ce23c63d75 Merge branch 'nwin:add-xattr-linux'
Conflicts:
	src/file.rs
2015-02-23 14:52:07 +00:00
Ben S
38a785426b Fix overflowing UIDs and GIDs
Fixes #26.
2015-02-23 13:37:59 +00:00
Ben S
1da1142a7e Fix panic when previewing symlink to ., .., or /
The old implementation blindly assumed that a symlink target would have a directory compoment, which the current directory, parent directory, and root directory technically don't have.

Fixes #20.
2015-02-23 11:32:35 +00:00
nwin
586c7dd30b Make the naming of variables more obvious. 2015-02-23 10:00:58 +01:00
nwin
1ab1f3f320 Add xattr support for linux 2015-02-23 09:48:26 +01:00
nwin
f44711cfd0 Fixed tests. 2015-02-23 08:30:58 +01:00
Ben S
51b35e795e Merge pull request #23 from Stebalien/cargo-release
Optimize Builds
2015-02-23 01:09:32 +00:00
Steven Allen
88b86b6123 Enable lto in release versions.
lto makes exa slightly faster and much smaller. I specify the other
options to make them explicit.

Note: lto makes compiling take quite a bit longer.
2015-02-22 20:05:21 -05:00
Steven Allen
444a1e08ea Instruct users to build the release version (it's a little faster). 2015-02-22 20:02:42 -05:00
Ben S
e21dc9af2a Merge pull request #21 from coyotebush/git-paths
Improve matching of Git status entries to files
2015-02-23 00:46:36 +00:00
Corey Ford
ee20c5d8bb Fix --sort=ext
The logic of the previous version wasn't correct. Also, presuming
natural ordering of full filenames is still reasonable when the
extensions are identical.
2015-02-23 00:06:43 +00:00
Ben S
ae39d0f8a7 Merge pull request #19 from Stebalien/replace-as_slice
Get rid of explicit `as_slice()` calls
2015-02-22 23:50:38 +00:00
Ben S
bd8e73b212 Merge pull request #17 from nwin/fix-column-alignment
Fix the column alignment
2015-02-22 23:48:30 +00:00
nwin
beaf8789ce true -> false 2015-02-23 00:08:44 +01:00
Corey Ford
6e19563879 Improve matching of Git status entries to files
The challenge is that the paths returned from libgit2's status listing
are from the perspective of the Git repository and thus effectively
relative to the working tree root, while the other paths we're
manipulating are (potentially) relative to our current working
directory. So, if those two aren't identical (if running from outside
the working tree, or from a subdirectory), the paths won't match up.

A reasonably reliable way around this is to resolve both types of paths
to absolute paths before comparing them. This fixes #15 at a basic
level, anyway.

What still doesn't work: referring to the working tree or one of its
descendants via a symlink. For that, we'd probably need to fully resolve
symlinks in the file path.

(The unwrap_or()'s are messy and will probably just result in missing
status information, but then, what information could you hope to get
without having both a current working directory and a Git working tree?)
2015-02-22 14:44:54 -08:00
nwin
0082563e47 Using the same alignment as ls. 2015-02-22 18:50:52 +01:00
nwin
8ac16fad8a Using convenience method and using extended clusters as recommended. 2015-02-22 18:36:11 +01:00
Steven Allen
2b5406842f Get rid of explicit as_slice() calls. 2015-02-22 12:11:33 -05:00
nwin
df909272a1 Count the number of grapheme clusters to determine the cell length. 2015-02-22 17:21:57 +01:00
nwin
4fd832aa5b Better error handling 2015-02-22 14:06:18 +01:00
nwin
3d587c4533 Rename attr to xattr 2015-02-22 13:55:13 +01:00
nwin
227ddc9a0c Fix other platforms than macos. 2015-02-22 13:44:55 +01:00
nwin
a3460cf031 remove debug print 2015-02-22 13:34:24 +01:00
nwin
37d79da201 Merge commit '53387122de3851df5e1e38ad2fedc01404568ada' into add-ext-attributes 2015-02-22 13:28:12 +01:00
nwin
48b6123165 Implement display of extended attributes 2015-02-22 13:26:52 +01:00
nwin
376e417c3f Replace &String with &str 2015-02-22 13:26:20 +01:00
Ben S
53387122de Merge pull request #10 from coyotebush/unicode-grid
Use file_name_width in grid
2015-02-22 11:35:58 +00:00
Corey Ford
43e8061996 Use file_name_width in grid
Filenames with characters that need multiple bytes in UTF-8, and/or
control characters like combining diacritics, would break the grid.
`StrExt::width` seems to do the right thing, and there's conveniently a
function here (which was otherwise unused) to call that.
2015-02-21 19:31:17 -08:00
Ben S
a4e17193d9 Add sort-by-date options
These were completely missing because I forgot about them... I added sorting functionality before I added date functionality, but it turns out I didn't even need the datetime library to do this!

However, this implementation feels incomplete. If you sort by the accessed date, it still displays the modified date, so the dates still look out of order. If I were to change the date column for the user, though, then there would still be no header to signify that the column has changed. I'm not sure how to proceed with this, but this is still missing functionality, so in it goes.
2015-02-22 00:40:46 +00:00
Ben S
d73b0a8ab5 Merge pull request #6 from mikefaille/master
FIX bitflags depedency
2015-02-21 23:46:52 +00:00
Ben S
f8768e7c01 Mandate --recurse with --tree
Fixes #7.
2015-02-21 23:43:40 +00:00
Michael Faille
2701c20a36 FIX bitflags depedency 2015-02-21 17:59:38 -05:00