Commit Graph

815 Commits

Author SHA1 Message Date
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
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