Commit Graph

18 Commits

Author SHA1 Message Date
Ben S
2ffa64cff6 Move all optional features into features module
This module provides feature-specific implementations, and also dummy implementations for when they aren't supported by the system or OS.

Doing it this way limits all the #[cfg(feature)] annotations, as we can now just include the module or not.
2015-03-26 00:37:12 +00:00
Ben S
9c2858e447 Upgrade to latest Rust
- old_path::Path isn't imported by default anymore
- range -> ..
2015-03-22 19:46:45 +00:00
Ben S
8615f44076 Spew comments everywhere 2015-02-26 08:27:29 +00:00
Ben S
571be76454 The Row struct's fields don't need to be pub 2015-02-26 07:42:58 +00:00
Ben S
f9f1c991cb details: filter is only used when recursing
So move it as part of 'recurse's option.
2015-02-26 07:26:04 +00:00
Ben S
134f9fc252 Refactor details view
Move most of the heavy lifting into a Table struct, which doesn't govern how the resulting table is *created*, only how it's *displayed*.
2015-02-26 07:18:08 +00:00
Ben S
f505bdc869 Add --level option to limit tree and recursion 2015-02-24 16:05:25 +00:00
Ben S
ce23c63d75 Merge branch 'nwin:add-xattr-linux'
Conflicts:
	src/file.rs
2015-02-23 14:52:07 +00:00
Steven Allen
2b5406842f Get rid of explicit as_slice() calls. 2015-02-22 12:11:33 -05:00
nwin
3d587c4533 Rename attr to xattr 2015-02-22 13:55:13 +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
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
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
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
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
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