Commit Graph

1037 Commits

Author SHA1 Message Date
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
Ben S
363d52dbb0 Code cleanups in filetype detection 2015-02-21 22:00:59 +00:00
Ben S
16346731ab Add link to README 2015-02-21 21:35:31 +00:00
Ben S
b2ed264ba4 Upgrade to latest Rust
- Feature flags changes (old_io, old_path)
- Slice syntax changes ([] -> [..])
2015-02-21 13:54:35 +00:00
Ben S
e15f72f049 Versions bump
This compiles, but with manymany warnings.
2015-02-21 13:51:44 +00:00
Ben S
900081e9c1 Versions bump 2015-02-17 07:50:52 +00:00
Ben S
03a05b7020 Detab 2015-02-13 21:24:29 +00:00
Ben S
d180a5f5e4 Use ansi_term's awesome new continuation colours 2015-02-13 21:24:10 +00:00
Ben S
113df66408 Merge branch 'localisation' 2015-02-13 12:41:08 +00:00
Ben S
ec51867a53 Upgrade to latest Rust
- Update package versions
- locale::default -> locale::english
- Argument handling changes
2015-02-12 22:33:01 +00:00
Ben S
2906b8676a Translate month names into the user's locale
This has been mostly done with changes in the datetime crate's suddenly
supporting locales.

It's still important that the user's locale is touched only once and
cached from that point on, so a struct in output::details has been made
public, along with that module. This will change later as that object
gains more and more uses thoughout the codes.
2015-02-10 18:14:56 +00:00
Ben S
e39a20a5d4 Use locale-defined decimal separator
Also, fix the broken tests by just using the default locale at test
time.
2015-02-10 16:42:25 +00:00
Ben S
84b18e5521 Add thousands seps to links and blocks columns 2015-02-10 16:21:19 +00:00
Ben S
21ac16f808 Format file size in bytes with the user's locale
Use the `locale` crate as a dependency to read in the set
thousands-separator character, and pass this to the file size column,
which uses it to add the separators in.

en_GB uses ","
fr_FR uses "" and just displays the numbers in one go.
2015-02-10 16:08:10 +00:00
Ben S
f3c3a02e98 Make --tree require --long 2015-02-10 12:08:01 +00:00