summaryrefslogtreecommitdiffstats
path: root/src/options.rs
AgeCommit message (Collapse)Author
2015-05-21Minuscule code cleanupBen S
2015-05-16Generify Table to be used in tests once againBen S
Finally! The benefit of having all the field-rendering code (in details.rs) separate from the value-getting code (in file.rs) is that rendering them can be tested again.
2015-05-16Add Default instances in OptionsBen S
2015-05-16Rename 'stat' -> 'metadata'Ben S
2015-05-12Lifetime-eliding action!Ben S
2015-05-12Minor whitespace changesBen S
2015-05-12Remove year field on timestamp columnBen S
It's now in the locals of the Table struct, and didn't really belong in the column anyway.
2015-05-12Move size_format into render_size methodBen S
The benefit of having these all as separate methods instead of using the same trait is that we can just pass parameters in like this!
2015-05-11Turn File into simply a data sourceBen S
And move all the rendering, ansi_term, colourful stuff into the output modules, which is the only place they should be used!
2015-05-09Add colours module, and disable them sometimesBen S
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-07Remove some unused functionsBen S
2015-05-03Continue using new metadata fieldsBen S
2015-04-23Use new io + path + fs libraries (LOTS OF CHANGES)Ben S
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-07Fix panic when using --long without git supportBen S
Fixes #55.
2015-04-04Upgrade to latest RustBenjamin Sago
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-03-26Move all optional features into features moduleBen S
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-11Merge pull request #49 from killercup/feature/group-is-useless-without-longBen S
Add "`--group` is useless without `--long`"
2015-03-10"`--group` is useless without `--long`"Pascal Hertleif
2015-03-10Git Column is Useless Without `--long`Pascal Hertleif
2015-03-10Make Git Column OptionalPascal Hertleif
Closes #47
2015-03-02Add --version command (and bump version)v0.2.0Ben S
2015-02-26Add --group-directories-first optionBen S
Closes #27.
2015-02-26details: `filter` is only used when recursingBen S
So move it as part of 'recurse's option.
2015-02-26Refactor details viewBen S
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-24Add extra special error for --levelBen S
2015-02-24Remove debugging printBen S
Everybody does it, right?
2015-02-24Add --level option to limit tree and recursionBen S
2015-02-23Allow --tree without --recurseBen S
See #24
2015-02-23Merge branch 'nwin:add-xattr-linux'Ben S
Conflicts: src/file.rs
2015-02-23Fixed tests.nwin
2015-02-23Fix --sort=extCorey Ford
The logic of the previous version wasn't correct. Also, presuming natural ordering of full filenames is still reasonable when the extensions are identical.
2015-02-22Get rid of explicit `as_slice()` calls.Steven Allen
2015-02-22Rename attr to xattrnwin
2015-02-22Fix other platforms than macos.nwin
2015-02-22Implement display of extended attributesnwin
2015-02-22Add sort-by-date optionsBen S
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-21Mandate --recurse with --treeBen S
Fixes #7.
2015-02-10Format file size in bytes with the user's localeBen S
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-10Make --tree require --longBen S
2015-02-09Only display the year if it's last yearBen S
Otherwise, just display the hour and minute.
2015-02-09Add shorthand options for displaying timestampsBen S
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-09Forbid --time without --long option, tooBen S
2015-02-09Add --tree to READMEBen S
2015-02-09Change time option's descriptionBen S
2015-02-09Initial work on date/time columns for filesBen S
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-05Upgrade to latest RustBen S
- std::os -> std::env
2015-02-05Refactor the code after tree view changesBen S
- 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-04Make transform_files statefulBen S
Using `retain` instead of `filter` means we can just re-use the same Vec.
2015-02-04Start using the new getopts interfaceBen S
2015-02-04unwrap_err() now uses DebugBen S