1. 15 11月, 2015 1 次提交
    • B
      Move many Options structs to the output module · 10468797
      Ben S 提交于
      This cleans up the options module, moving the structs that were *only* in use for the columns view out of it.
      
      The new OptionSet trait is used to add the ‘deduce’ methods that used to be present on the values.
      10468797
  2. 04 11月, 2015 3 次提交
  3. 03 11月, 2015 1 次提交
  4. 06 9月, 2015 1 次提交
  5. 04 9月, 2015 3 次提交
  6. 03 9月, 2015 2 次提交
    • B
      It's hardly worth giving Exa its own constructor · a14f1d82
      Ben S 提交于
      a14f1d82
    • B
      Parallelise the details view! · 4e49b91d
      Ben S 提交于
      This commit removes the threadpool in `main.rs` that stats each command-line argument separately, and replaces it with a *scoped* threadpool in `options/details.rs` that builds the table in parallel! Running this on my machine halves the execution time when tree-ing my entire home directory (which isn't exactly a common occurrence, but it's the only way to give exa a large running time)
      
      The statting will be added back in parallel at a later stage. This was facilitated by the previous changes to recursion that made it easier to deal with.
      
      There's a lot of large sweeping architectural changes. Here's a smattering of them:
      
      - In `main.rs`, the files are now passed around as vectors of files rather than array slices of files. This is because `File`s aren't `Clone`, and the `Vec` is necessary to give away ownership of the files at the appropriate point.
      - In the details view, files are now sorted *all* the time, rather than obeying the command-line order. As they're run in parallel, they have no guaranteed order anyway, so we *have* to sort them again. (I'm not sure if this should be the intended behaviour or not!) This means that the `Details` struct has to have the filter *all* the time, not only while recursing, so it's been moved out of the `recurse` field.
      - We use `scoped_threadpool` over `threadpool`, a recent addition. It's only safely used on Nightly, which we're using anyway, so that's OK!
      - Removed a bunch of out-of-date comments.
      
      This also fixes #77, mainly by accident :)
      4e49b91d
  7. 26 8月, 2015 1 次提交
    • B
      Scan for nested files on-demand, not all the time · b5edee53
      Ben S 提交于
      This does a similar thing that we did with the xattrs, except with the nested files: it removes the 'this' field on File, and replaces it with a method (to_dir) that has the same effect.
      
      This means we get to remove a bunch of 'recurse' fields and parameters that really had no business being there! Now the table doesn't need to know whether it's going to need to list files recursively or not.
      b5edee53
  8. 25 8月, 2015 2 次提交
    • B
      Display errors inline in the tree · 2a9b6fe9
      Ben S 提交于
      When tree mode is active, this will print out errors as another form of child node in the tree, instead of in one big block before any output.
      
      The 'this' field now holds the io::Result of the readdir call, rather than only a *successful* result.
      2a9b6fe9
    • B
      Make Dir return an Iterator of files, not Vec · 5d0bd371
      Ben S 提交于
      This is part of work to make the flow of files more iterator-able, rather than going in and out of vectors. Here, a Dir returns an iterator of files, rather than a pre-filled vector.
      
      For now, this removes the ability for error messages to be displayed. Will be added in later though!
      5d0bd371
  9. 04 8月, 2015 1 次提交
    • B
      Fix bug where Git repos were always queried · d547c3f5
      Ben S 提交于
      This is very slow (see #28) at the moment, so there's an option to switch off repo discovery. However, they were still always being queried. Now, if there's no Git option in the flags, it won't try to discover a repo.
      d547c3f5
  10. 02 8月, 2015 1 次提交
    • B
      Use new slice_splits functions · 21ee2fbb
      Ben S 提交于
      These replace `init()` and `tail()` which are deprecated in favour of these.
      
      In fact, it's a good thing they're deprecated, because part of the path_prefix code involved working around a call to init() that would panic otherwise - doing the same check with an `Option` is much more ergonomic.
      21ee2fbb
  11. 28 6月, 2015 1 次提交
    • B
      Add --grid --long option · ccdf9ff4
      Ben S 提交于
      This commit adds --grid, which, when used with --long, will split the details into multiple columns. Currently this is just 2 columns, but in the future it will be based on the width of the terminal.
      
      In order to do this, I had to do two things:
      
      1. Add a `links` parameter to the filename function, which disables the printing of the arrow and link target in the details view. When this is active, the columns get way too large, and it becomes not worth it.
      2. Change the `print_table` function from actually printing the table to stdout to returning a list of `Cells` based on the table. This list then gets its width measured to calculate the width of the resulting table.
      ccdf9ff4
  12. 23 6月, 2015 1 次提交
  13. 21 6月, 2015 1 次提交
  14. 18 6月, 2015 1 次提交
  15. 09 6月, 2015 1 次提交
  16. 05 6月, 2015 1 次提交
  17. 21 5月, 2015 1 次提交
  18. 17 5月, 2015 1 次提交
  19. 16 5月, 2015 1 次提交
  20. 12 5月, 2015 1 次提交
  21. 10 5月, 2015 1 次提交
    • B
      Add colours module, and disable them sometimes · 36116a14
      Ben 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.
      36116a14
  22. 08 5月, 2015 1 次提交
  23. 03 5月, 2015 6 次提交
  24. 23 4月, 2015 2 次提交
    • B
      Use unicode_width crate · d7d11f77
      Ben S 提交于
      d7d11f77
    • B
      Use new io + path + fs libraries (LOTS OF CHANGES) · adbaa51c
      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.
      adbaa51c
  25. 04 4月, 2015 1 次提交
    • B
      Upgrade to latest Rust · f8855681
      Benjamin 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
      f8855681
  26. 26 3月, 2015 1 次提交
    • B
      Move all optional features into features module · 2ffa64cf
      Ben 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.
      2ffa64cf
  27. 23 3月, 2015 2 次提交