Commit Graph

453 Commits

Author SHA1 Message Date
Ben S
3242cb216a Fix failing tests 2015-01-31 17:24:54 +00:00
Ben S
10096d1043 Prevent crash for filenames with no components
Now there are no more unwrap()s!
2015-01-31 17:18:53 +00:00
Ben S
6d4b30d531 Code changes in preparation for recursion 2015-01-31 16:10:40 +00:00
Ben S
c7e8a28e17 Add a bunch of feature flags 2015-01-29 14:06:17 +00:00
Ben S
b0cdd17b97 Change the way columns are created
You can now have different columns per directory. So now, the Git column only appears when there's a Git repository in the current directory.
2015-01-28 22:02:25 +00:00
Ben S
947087567c Upgrade to latest Rust
- Rename std::io to std::old_io
2015-01-28 16:55:34 +00:00
Ben S
be9eefe44b Oops, fix --no-default-features compilation 2015-01-28 16:53:13 +00:00
Ben S
e86f0e12bf Merge branch 'git-status' 2015-01-28 15:55:46 +00:00
Ben S
04b2483d1f Compare vectors, not strings
This is good for two reasons: 1) shorter code! 2) it won't fail if any of the filenames aren't valid UTF-8.
2015-01-28 15:49:17 +00:00
Ben S
f794f5eda6 Implement Git status for directories 2015-01-28 10:43:19 +00:00
Ben S
f6cbfc7276 Support Git by default 2015-01-27 16:03:26 +00:00
Ben S
1d0cc329eb Don't even show the column without the feature 2015-01-27 15:30:55 +00:00
Ben S
90d4684de4 Preliminary Git support!
This is something that I've long wanted to add. It uses libgit2 as an optional dependency.
2015-01-27 15:01:17 +00:00
Ben S
e835fe8fe3 Make all fields of Dir private 2015-01-26 17:26:11 +00:00
Ben S
da9d1f77d9 Cache the lowercased extension
Extensions aren't ever displayed in lowercase, just compared case-insensitively, so this makes sense.
2015-01-26 01:16:19 +00:00
Ben S
22a4dc90b9 Update #[derive] names 2015-01-26 00:27:06 +00:00
Benjamin Sago
8e33c75355 Simplify columns view code
The widths come pre-computed, so there's no reason to keep them around in this table anymore.
2015-01-25 19:20:51 +00:00
Benjamin Sago
628d90fe44 Test extension extraction 2015-01-25 13:47:07 +00:00
Benjamin Sago
ef4428fab1 Test highlighting of groups and group names 2015-01-25 13:43:44 +00:00
Benjamin Sago
191c0e5b90 Test highlighting of usernames 2015-01-25 13:04:15 +00:00
Benjamin Sago
c53a0156e6 Extract symlink stuff into its own method 2015-01-24 17:34:33 +00:00
Benjamin Sago
449592c150 Do column width calculations ourselves (speedup)
Instead of stripping the ANSI formatting characters from our strings, work out the length without them and use that. This is per-column, but most of them are simple (just the same number of characters in the non-coloured string).

Sometimes, this is really simple: for example, trwxrwxrwx permissions strings are always going to be ten characters long, and the strings that get returned are chock full of ANSI escape codes.

This should have a small benefit on performance.
2015-01-24 17:26:26 +00:00
Benjamin Sago
f82dc741de Correct argument name 2015-01-24 17:14:25 +00:00
Benjamin Sago
74fd04c1fb Forbid a few more option combinations 2015-01-24 16:03:58 +00:00
Benjamin Sago
0edf761d22 Add all-important dots 2015-01-24 16:02:52 +00:00
Ben S
64c1600cd4 Make some fields private 2015-01-24 13:44:25 +00:00
Ben S
709fb71e69 Actually use the is_dotfile method 2015-01-24 12:53:25 +00:00
Ben S
2ba0b3bd5f Convert docs to standard format 2015-01-24 12:38:05 +00:00
Ben S
6457f4b577 Rename exa.rs to main.rs 2015-01-23 19:36:01 +00:00
Ben S
0e473bf37b Upgrade to latest Rust, and move options code 2015-01-23 19:27:06 +00:00
Benjamin Sago
95388e6e90 Fix header-printing logic 2015-01-13 00:35:44 +01:00
Benjamin Sago
728e7dd976 Forbid certain argument combinations 2015-01-13 00:31:30 +01:00
Benjamin Sago
3d59a48efe Make option parsing unit-testable 2015-01-12 22:47:05 +01:00
Benjamin Sago
1ec4451016 rm trailing whitespace 2015-01-12 22:46:04 +01:00
Benjamin Sago
23e5d3ce8d Allow for different types of failure 2015-01-12 22:14:27 +01:00
Benjamin Sago
3f08836c3f Move viewing code to its own module 2015-01-12 21:08:42 +01:00
Benjamin Sago
9729679f05 Main code tidy-ups 2015-01-12 20:48:07 +01:00
Benjamin Sago
d93bca8779 Make some options fields private 2015-01-12 19:44:39 +01:00
Benjamin Sago
1c5409e253 Upgrade to Rust alpha
- uint -> usize
- getopts Cargo library
- replace feature gates with unstable APIs
2015-01-12 01:31:24 +01:00
Benjamin Sago
2784baea0a Switch to Crates dependencies format 2015-01-12 01:20:28 +01:00
Ben S
ee23d6b33a Upgrade to working library versions 2015-01-06 23:39:24 +00:00
Ben S
d400231de5 Upgrade to latest Rust
Also, remove dependency on the Regex library by replacing the one place it was used with standard code that should hopefully be faster anyway.
2015-01-05 14:41:43 +00:00
Ben S
ba36d4f7f0 Library and Rust upgrades 2015-01-04 13:56:07 +00:00
Benjamin Sago
fdf95fc206 to_ascii_lower -> to_ascii_lowercase 2015-01-01 02:37:10 +00:00
Ben S
e3a8342173 Upgrade code and libraries to latest Rust
std::str changes, and the way macros are expanded.
2014-12-24 04:31:59 +00:00
Ben S
fbdc9c4268 Use brighter colours in screenshot 2014-12-18 07:16:27 +00:00
Ben S
a871a448be Add --bytes to not use prefixes at all 2014-12-18 07:04:31 +00:00
Ben S
f03a496424 Only underline executable *files* in perms view 2014-12-18 07:00:51 +00:00
Ben S
24628f97be Use number_prefix crate for number prefixes 2014-12-18 07:00:31 +00:00
Ben S
e005174577 Extract separator_width variable 2014-12-14 19:05:07 +00:00