Commit Graph

333 Commits

Author SHA1 Message Date
Ben S
8b520edf3d Only display the year if it's last year
Otherwise, just display the hour and minute.
2015-02-09 18:14:05 +00:00
Ben S
bc7492e7e6 Add hour and minute to timestamps 2015-02-09 17:55:55 +00:00
Ben S
bf815afa8e Use short month names to make them line up 2015-02-09 17:37:02 +00:00
Ben S
1e48539380 Add shorthand options for displaying timestamps
Add options -u, -U, and -m as shorthand options for displaying different
types of timestamp, not just one. It's possible to have more than one by
specifying more than one of these shorthands, but *not* when used with
--time, as this is only meant to display one at a time.
2015-02-09 17:20:42 +00:00
Ben S
4a6555b9a9 Forbid --time without --long option, too 2015-02-09 16:55:00 +00:00
Ben S
0d7de0a2fa Add --tree to README 2015-02-09 16:49:31 +00:00
Ben S
a777794f65 Change time option's description 2015-02-09 16:36:51 +00:00
Ben S
0d25a90ef1 Initial work on date/time columns for files
Using the datetime crate, add an extra column to the --long view that
prints out the modified, accessed, or created timestamp for each file.
Also, let the user pick which one they want to see based on the --time
command-line option.
2015-02-09 16:33:27 +00:00
Ben S
5a64b51b27 Actually show the header all the time 2015-02-08 14:23:54 +00:00
Ben S
cf1f1f3ec5 Get latest versions of libc and getopts 2015-02-08 14:23:37 +00:00
Ben S
3289b82e2f Bump versions! 2015-02-06 13:59:16 +00:00
Ben S
055854d839 Upgrade to latest Rust
- std::os -> std::env
2015-02-05 15:25:59 +00:00
Ben S
42ae7b3d33 Refactor the code after tree view changes
- Turn the views and main program loop into structs, rather than just as one gigantic function
- Separate views into their own files

The addition of the git column and the tree view meant that a lot of functions now just took extra arguments that didn't seem to fit. For example, it didn't really work to have only one 'view' method that printed out everything, as the different view options now all take different parameters.
2015-02-05 14:39:56 +00:00
Ben S
5f2acf570c Use the new IntoIterator trait
See RFC 235
2015-02-04 16:03:39 +00:00
Ben S
2be30f36f2 Make transform_files stateful
Using `retain` instead of `filter` means we can just re-use the same Vec.
2015-02-04 15:47:52 +00:00
Ben S
8f36dbbc6f Start using the new getopts interface 2015-02-04 14:51:55 +00:00
Ben S
0f1843f5e7 Use latest, working version of ansi_term crate 2015-02-04 14:51:25 +00:00
Ben S
184c27f5b4 unwrap_err() now uses Debug 2015-02-04 01:40:12 +00:00
Ben S
815ec8a4ab Update to most recent versions of libraries 2015-02-04 01:34:21 +00:00
Ben S
1bced1423b Fix tests from tree view fallout 2015-02-04 01:12:08 +00:00
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