Commit Graph

55 Commits

Author SHA1 Message Date
Ben S
8d6f62840a Use term_grid crate for grid formatting
Fixes #39!
2015-06-23 10:54:57 +01:00
Ben S
b235b64060 The feature flags wheel keeps on turning... 2015-06-21 12:52:53 +01:00
Benjamin Sago
488c7dc9c4 Remove a few feature flags 2015-06-17 18:31:53 +01:00
Ben S
2d8a9b49be Various unimportant style changes 2015-06-08 21:33:39 +01:00
Ben S
ea3a57eb97 Start using threadpool crate 2015-06-05 03:04:56 +01:00
Ben S
31ce5b27ab StatResult::Path -> Dir 2015-05-21 16:09:16 +01:00
Ben S
a687dc936e Rename 'stat' -> 'metadata' 2015-05-16 18:16:35 +01:00
Ben S
2594690aff Start using the libc crate from crates.io 2015-05-16 13:17:50 +01:00
Ben S
00ae71850b Lifetime-renaming action! 2015-05-12 15:38:12 +01:00
Ben S
36116a1420 Add colours module, and disable them sometimes
Colours are now disabled when output is not to a terminal. Fixes #53!

This required some internal restructuring - colours are now in their own object that gets passed around everywhere it's needed.
2015-05-09 23:57:18 +01:00
Ben S
9d1aadc808 The modules don't actually need to be public 2015-05-07 22:20:24 +01:00
Ben S
42a347c063 Use OS-defined permission bits type 2015-05-03 16:35:44 +01:00
Ben S
8eaa4c550c Continue using new metadata fields 2015-05-03 16:25:53 +01:00
Ben S
06ef372560 Remove unused feature gates 2015-05-03 14:57:56 +01:00
Ben S
64b97aa9f3 Start following symlinks again
This was my favourite feature, so I'm glad to see it back!
2015-05-03 13:10:25 +01:00
Ben S
41aadaeab4 Re-implement no-longer-missing metadata fields 2015-05-03 12:46:05 +01:00
Ben S
d7a2974494 Permissions are back! 2015-05-03 11:55:10 +01:00
Ben S
d7d11f77f3 Use unicode_width crate 2015-04-23 13:46:37 +01:00
Ben S
adbaa51cb9 Use new io + path + fs libraries (LOTS OF CHANGES)
Exa now uses the new IO, Path, and Filesystem libraries that have been out for a while now.

Unfortunately, the new libraries don't *entirely* cover the range of the old libraries just yet: in particular, to become more cross-platform, the data in `UnstableFileStat` isn't available in the Unix `MetadataExt` yet. Much of this is contained in rust-lang/rfcs#1044 (which is due to be implemented in rust-lang/rust#14711), but it's not *entirely* there yet.

As such, this commits a serious loss of functionality: no symlink viewing, no hard links or blocks, or users or groups. Also, some of the code could now be optimised. I just wanted to commit this to sort out most of the 'teething problems' of having a different path system in advance.

Here's an example problem that took ages to fix for you, just because you read this far: when I first got exa to compile, it worked mostly fine, except calling `exa` by itself didn't list the current directory. I traced where the command-line options were being generated, to where files and directories were sorted, to where the threads were spawned... and the problem turned out to be that it was using the full path as the file name, rather than just the last component, and these paths happened to begin with `.`, so it thought they were dotfiles.
2015-04-23 13:00:34 +01:00
Benjamin Sago
f885568145 Upgrade to latest Rust
Still missing a few Beta features, but it compiles!

- Copy requires Clone
- current_dir returns a Path now
- num_cpus moved to a crate
2015-04-04 00:14:56 +02:00
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
d71140079b Missed a feature flag... 2015-03-22 19:54: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
cf38f90aa9 Sweep deprecated warnings under the rug 2015-03-07 23:01:57 +00:00
bp
9f9b8ca33e clean up consumer to make code more readable 2015-03-03 22:57:48 -05:00
bp
d9a0458a39 fix bug where a failed stat would cause the consumer thread to hang 2015-03-03 22:41:30 -05:00
bp
53a723b4ba making Exa.load() stat files in parallel 2015-03-03 21:48:36 -05:00
Ben S
9e7c80bcd0 Upgrade to latest Rust
- env is no longer feature gated
- exit_status is!
2015-03-02 01:59:43 +00:00
Ben S
027ca60d90 current_dir -> getcwd
current_dir returns a new PathBuf, but getcwd returns an old Path. One day I'll have to upgrade to the new Path library. One day.

Fixes #41.
2015-03-01 13:50:15 +00:00
Ben S
8139cfedea Fewer warnings when testing 2015-02-26 07:42:37 +00:00
Ben S
abf7bf7a3e We don't use plugin anymore 2015-02-26 07:18:18 +00:00
Ben S
17657100b4 Fix bug where the wrong level was used for . dir 2015-02-24 16:08:22 +00:00
Ben S
f505bdc869 Add --level option to limit tree and recursion 2015-02-24 16:05:25 +00: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
48b6123165 Implement display of extended attributes 2015-02-22 13:26:52 +01: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
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
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
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
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
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
5611a5768a Recurse into directories 2015-02-01 02:14:31 +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