Commit Graph

263 Commits

Author SHA1 Message Date
Ben S
d5aa3208b6 Merge branch 'tree' 2015-02-04 01:05:31 +00:00
Ben S
e85460998e Replace hash marks with decent-looking tree
This commit has been brought to you by Unicode Box-Drawing Characters!
2015-02-04 00:59:27 +00:00
Ben S
5eb9f9e414 Have tree view obey filtering and sorting 2015-02-03 21:26:21 +00:00
Ben S
d4d04b7e92 Turn the file filter options into their own struct 2015-02-03 17:03:58 +00:00
Ben S
827a1e11fd Make filename not a column
FileName was always a special-cased column, as it was assumed to be the last column in the output. Now, it's explicitly marked as such. This allows the hash marks to be placed before the filename, rather than at the start of the line.
2015-02-03 13:48:39 +00:00
Ben S
f825397912 Replace tuple with actual struct 2015-02-03 13:32:42 +00:00
Ben S
5099b3f119 Initial tree implementation
There's still a lot to do, but this is actually *something*. The tree hierarchy is displayed using hashes at the start of a line. I want to have it just before the filename, but this will need some changes to the way that columns are handled.
2015-02-03 13:27:23 +00:00
Ben S
7acc1b09d5 Merge branch 'recursion' 2015-02-01 09:59:29 +00:00
Ben S
a2020c6457 What the heck? 2015-02-01 09:39:30 +00:00
Ben S
5611a5768a Recurse into directories 2015-02-01 02:14:31 +00:00
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