Commit Graph

246 Commits

Author SHA1 Message Date
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
Ben S
809af4e133 Merge branch 'timestamps'
Conflicts:
	Cargo.lock
2015-02-10 11:43:57 +00:00
Ben S
9dbca5f12a Use specified version of datetime
This prevents crates.io from doing weird things from a circular depedency, which is probably my fault.
2015-02-09 23:51:26 +00:00
Ben S
131dd606da Fix Travis tests
It kept on using 0.1.1, which didn't actually compile.
2015-02-09 21:46:34 +00:00
Ben S
924416d8fb Actually use the public datetime crate... 2015-02-09 19:40:49 +00:00
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