1. 21 8月, 2017 1 次提交
    • B
      Default to sorting case-insensitively · 57c647fe
      Benjamin Sago 提交于
      This was touched on in #209 where I got the docs wrong compared to the actual implementation, but after thinking about it, I’d like to switch it round. (The --sort=Name and --sort=name difference has also been switched.) See the big ol’ comment for my reasons.
      
      Because this changes core functionality, it broke many, many tests. You can see that this doesn’t change the -star- tests because the shell, rather than exa, orders the globbed files.
      
      I kept on forgetting which way round Sensitive and Insensitive went, so I named them after the effect they have.
      57c647fe
  2. 20 8月, 2017 12 次提交
  3. 19 8月, 2017 8 次提交
  4. 13 8月, 2017 6 次提交
    • B
      Merge branch 'row-threshold' · e933fa6a
      Benjamin Sago 提交于
      This merge adds the EXA_GRID_ROWS environment variable, which disables the grid-details view if it doesn’t result in enough rows of output.
      
      Fixes #138.
      e933fa6a
    • B
      Tie the row threshold to EXA_GRID_ROWS · bcf5213c
      Benjamin Sago 提交于
      This makes it its own type, rather than just another environment variable that’s easily missed.
      bcf5213c
    • B
      env vars should be referenced, not copied · 6740faa7
      Benjamin Sago 提交于
      Just because the type that gets used right now is Copy and Clone doesn’t mean that when we pass mock ones in for tests they’ll be those two as well. So we have to go through and add &s everywhere.
      6740faa7
    • B
      match-to-if-let · 33e83acc
      Benjamin Sago 提交于
      33e83acc
    • B
      Thread the row threshold through grid_details · da00e2fd
      Benjamin Sago 提交于
      No new features here, just some restructuring. Mode::GridDetails was nice and elegant with those two fields, but now there’s a grid-details-only option the elegance has gone out the window.
      da00e2fd
    • B
      By lines, I meant details · a6ed4210
      Benjamin Sago 提交于
      Yeah, I forgot what I was meant to be doing half-way through.
      
      This also adds the row_threshold field, which disables the view unless there will be more than the given number of rows. Getting the row count required upgrading term_grid to a version that has that function added.
      a6ed4210
  5. 12 8月, 2017 8 次提交
  6. 11 8月, 2017 5 次提交
    • B
      Hide xattr errors unless --extended · 5189d66e
      Benjamin Sago 提交于
      exa now ignores errors when checking for extended attributes when the user didn’t explicitly demand that they be checked. If a file does have xattrs, it’ll still display the @ in the permissions column; errors will now just cause the @ to be hidden instead.
      
      This changed a lot of the xtests, which were displaying the error message in a few situations. Those tests have gained @-suffixed companions so the actual error messages can still be tested.
      
      Fixes #178 (finally)
      5189d66e
    • B
      Merge branch 'strict-mode-properly' · 97d14723
      Benjamin Sago 提交于
      This adds a check for the EXA_STRICT environment variable, and uses it to put exa in a strict mode, which enables more checks for useless/redundant arguments.
      
      Its other goal was to move all the option parsing tests out of options/mod.rs and into the files where they’re actually relevant. THIS IS NOT YET DONE and I’ll have to do some more work on this prior to release to clear up the last few lingering issues. There are almost certainly going to be cases where redundant arguments are still complained about (or ignored) by mistake.
      
      But I want to get this branch merged so I can take care of some other stuff for the next release.
      97d14723
    • B
      Add actual error messages for the error messages · b2866766
      Benjamin Sago 提交于
      The annoying part is trying to format!() an OsStr.
      b2866766
    • B
      Integrate strict mode, use it to test file sizes · adaa36e1
      Benjamin Sago 提交于
      It’s a good test to be able to switch strict mode on in run.sh and not have it break anything! Now, the EXA_STRICT environment variable will toggle it on. We can even switch it off and see that it doesn’t error.
      adaa36e1
    • B
      Extract var_os and use the mock to test · dbebd60c
      Benjamin Sago 提交于
      Some of the deduce functions used to just blatantly call std::env::var_os and not care, introducing global state into a module that was otherwise nice and functional and self-contained. (Well, almost. There’s still terminal width.)
      
      Anyway, this made it hard to test, because we couldn’t test it fully with this global dependency in place. It *is* possible to work around this by actually setting the environment variables in the tests, but this way is more self-documenting.
      
      With this in place, we can start to unit test things like deriving the view by passing in what the $COLUMNS environment variable should be, and that’s one of the first things checked.
      
      src/options/mod.rs *almost* has all its tests moved to where they should be!
      dbebd60c