1. 24 7月, 2017 1 次提交
    • B
      Move filter and dir_action from options to fs · 5b1966d2
      Benjamin Sago 提交于
      This commit moves the definitions of Filter and DirAction from the options module to the fs module, but leaves the parts that actually have to do with option parsing alone.
      
      Now, the options module shouldn’t define any types that get used elsewhere in the program: it only adds functionality to types that already exist.
      5b1966d2
  2. 23 7月, 2017 1 次提交
  3. 13 7月, 2017 9 次提交
  4. 12 7月, 2017 1 次提交
  5. 10 7月, 2017 3 次提交
    • B
      Merge branch 'file-namers' · f54bc417
      Benjamin Sago 提交于
      This creates a new type that holds file extensions in preparation for #116. It doesn’t do anything yet, but it will!
      f54bc417
    • B
      Get the list of file extensions from the Options · c29170e3
      Benjamin Sago 提交于
      The FileExtensions in the FileName is now a reference to the one in the original FileStyle, which gets put there in the options module.
      
      This allows the extensions to be derived from the user, somehow, in the future when that part’s done.
      c29170e3
    • B
      Reify file extensions · 0d8d7234
      Benjamin Sago 提交于
      Instead of having a File do its own extension checking, create a new type that takes a file and checks *that*. This new type (FileExtensions) is currently empty, but were it to contain values, those values could be used to determine the file’s colour.
      0d8d7234
  6. 08 7月, 2017 2 次提交
    • B
      Make not showing paths in link targets the default · bfa65b3b
      Benjamin Sago 提交于
      This commit replaces the “two normal cases” of showing a link’s target or not with “one default and one special case” of preferring to hide them, displaying the link targets by setting a flag instead.
      
      Doing this simplifies the file name constructor, which gets to remove an argument.
      bfa65b3b
    • B
      Replace FileName::new with a factory · 0d613652
      Benjamin Sago 提交于
      The new FileStyles value will contain all the fields necessary to “style” a file’s name. Right now this is only the Classify field, but there can be more later. The benefit of this is that when we add more, we won’t need to update all the places where file names are displayed.
      0d613652
  7. 07 7月, 2017 2 次提交
  8. 06 7月, 2017 11 次提交
    • B
      Merge branch 'time-styles-properly' · 690aa21a
      Benjamin Sago 提交于
      This merges in the ability to use different time styles, such as full ISO-formatted timestamps instead of just using the default variable style.
      
      Firstly, this moved the Environment from the Table to the Columns, so it 1) would only be instantiated when a table is actually used, and 2) can be affected by command-line options.
      
      Next, it renames Columns to table::Options, in line with what the view optionses were renamed to.
      
      Finally, it adds support for more time styles, deferring timestamp formatting to an enum.
      
      Fixes #133.
      690aa21a
    • B
      Document --time-style, and completions · 6afde85e
      Benjamin Sago 提交于
      6afde85e
    • B
      Add iso time style · 3251378e
      Benjamin Sago 提交于
      3251378e
    • B
      Add full-iso time style · f0eed9fd
      Benjamin Sago 提交于
      f0eed9fd
    • B
      Add long-iso style and --time-style option · 786e8f4d
      Benjamin Sago 提交于
      This has to do its own number formatting because *somebody* didn’t add “print the current month number” functionality to rust-datetime!
      786e8f4d
    • B
      Expect different time formats · 98b63705
      Benjamin Sago 提交于
      98b63705
    • B
      Make nanoseconds available to times · aa5b1867
      Benjamin Sago 提交于
      The information was always in the Metadata struct; exa just never used it.
      aa5b1867
    • B
      Fix bug where accessed times were wrong! · 5bdf6304
      Benjamin Sago 提交于
      It used the mtime, rather than the atime. Copy and paste error. Whoops!
      5bdf6304
    • B
      Separate TimeFormat from the Environment · ba335bb6
      Benjamin Sago 提交于
      By moving it outside of the Environment::load_all() constructor, it can be set to different values.
      ba335bb6
    • B
      Move Environment to a table’s Options · d93e168b
      Benjamin Sago 提交于
      This commit moves the Environment field from the Table to its Options, and properly gets rid of the name ‘columns’ from the last commit.
      
      Having it in the Options is important, because it means it can be generated from some command-line options. Also, it reduces the number of arguments that need to be passed to Table::new; there would have been 4 with the inclusion of the Environment, but by moving some of the code into the function, we can avoid this (and any further arguments).
      d93e168b
    • B
      Rename Columns to table::Options · 268b7d52
      Benjamin Sago 提交于
      The views have been renamed to be the Optionses of their module; now the options for the Table — Columns — has followed suit.
      
      This works out, because the table module depended on everything in the columns module. It opens the door for other only-table-specific things to be included.
      
      The casualty was that by making it non-Clone and non-PartialEq, a bunch of other #[derive]-d types had to have their derivions removed too.
      268b7d52
  9. 05 7月, 2017 4 次提交
    • B
      Environment Default trait · d27812f8
      Benjamin Sago 提交于
      The Environment struct only used the Default trait so it could have the same call for both Environment<UsersCache> and Environment<MockUsers>. There’s no reason to keep it around anymore.
      d27812f8
    • B
      Merge branch 'more-misc-refactorings' · 651d23fe
      Benjamin Sago 提交于
      This commit merges in a *lot* of refactoring work done to the tree, details, and grid-details views.
      
      The main one is that the concept of a “table” has been completely separated from the details view. Previously, if you wanted to use the long view without drawing the table (such as with --tree), exa used a “table” with 0 columns in it behind the scenes. This is now reversed: the table is now the optional component in the details view, and a tree-only view is just a details view without a table!
      
      Doing this has paved the way for all sorts of code cleanups: now, we only calculate values needed for the table if one’s going to be displayed. Some of these were rather expensive to compute (such as the user’s time zone, or locale)
      
      This refactoring is not fully complete; there are still several things that can be done, including having the errors and xattrs in the tree view use the same TreeParams constructor as the others, and separating the column widths from the table so fewer mutable values need to be passed around.
      
      Finally, this also merges in a lot of debuffering. There were at least two places in the code where values were collected into a vector before immediately being iterated over, instead of just using those values as they were generated! For example, when displaying the table, each row was rendered into a set of cells for displaying: but then it all went into a vector, and was only displayed at the very end, because that was what I needed for the grid-details view. Now, exa is smart enough to not do that.
      
      Basically, even if exa doesn’t actually *get* that much faster, it should at least display its first line of output quicker.
      
      Fixes #90, but also see #82.
      651d23fe
    • B
      Fix tree permissions bug · f4ddbf38
      Benjamin Sago 提交于
      There was a bug where if you tried to recurse into a directory you didn’t have permission to read the contents of, the error would be ignored.
      
      It now displays the errors.
      f4ddbf38
    • B
      Much more thorough xattr testing · 882ac489
      Benjamin Sago 提交于
      It now tests a lot more combinations of xattrs on files, as well as xattrs and files and errors as the children of directories.
      
      The recent code changes have touched the part where directories’ xattrs and children are displayed at the same tree level, and there weren’t enough tests for this.
      882ac489
  10. 04 7月, 2017 6 次提交
    • B
      Give Tree its own iterator · 4c41141c
      Benjamin Sago 提交于
      The goal of this part of the refactoring, if you wondered, is to make it so only the tree module is aware that it needs ‘depth’ and ‘last’ values to draw the tree.
      
      As far as the details module is concerned, it should just be doing something to produce TreeParams values which it later consumes; that’s it.
      
      This change should make it easier to have tables that may or may not have a tree in them.
      4c41141c
    • B
      Move this up · a32b0dfb
      Benjamin Sago 提交于
      a32b0dfb
    • B
      Rename some stuff · 80d5c2ad
      Benjamin Sago 提交于
      80d5c2ad
    • B
      Encapsulate tree depth · c0a2cf50
      Benjamin Sago 提交于
      It only really gets used for zeroes and having one added to it.
      c0a2cf50
    • B
      Make struct for all tree parameters · 8453f45f
      Benjamin Sago 提交于
      The fields for ‘depth’ and ‘last’ were being passed around separately, but were always used together.
      8453f45f
    • B
      I give up · 09b6ee70
      Benjamin Sago 提交于
      09b6ee70