1. 20 8月, 2017 1 次提交
    • B
      Fix an error being displayed weirdly · 4c16f505
      Benjamin Sago 提交于
      The Debug impl was being used instead of the Display one. Also, remove the full stops from the ends of all the error messages because I’ve decided it looks weird.
      4c16f505
  2. 19 8月, 2017 1 次提交
  3. 12 8月, 2017 1 次提交
  4. 11 8月, 2017 3 次提交
    • 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
      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
  5. 07 8月, 2017 3 次提交
  6. 06 8月, 2017 1 次提交
  7. 27 7月, 2017 1 次提交
    • B
      Switch to the new options parser · 2d1f462b
      Benjamin Sago 提交于
      This commit removes the dependency on the ‘getopts’ crate entirely, and re-writes all its uses to use the new options parser instead.
      
      As expected there are casualties galore:
      
      - We now need to collect the options into a vector at the start, so we can use references to them, knowing they’ll be stored *somewhere*.
      - Because OsString isn’t Display, its Debug impl gets used instead. (This is hopefully temporary)
      - Options that take values (such as ‘sort’ or ‘time-style’) now parse those values with ‘to_string_lossy’. The ‘lossy’ part means “I’m at a loss for what to do here”
      - Error messages got a lot worse, but “--tree --all --all” is now a special case of error rather than just another Misfire::Useless.
      - Some tests had to be re-written to deal with the fact that the parser works with references.
      - ParseError loses its lifetime and owns its contents, to avoid having to attach <'a> to Misfire.
      - The parser now takes an iterator instead of a slice.
      - OsStrings can’t be ‘match’ patterns, so the code devolves to using long Eq chains instead.
      - Make a change to the xtest that assumed an input argument with invalid UTF-8 in was always an error to stderr, when that now in fact works!
      - Fix a bug in Vagrant where ‘exa’ and ‘rexa’ didn’t properly escape filenames with spaces in.
      2d1f462b
  8. 06 7月, 2017 5 次提交
  9. 05 7月, 2017 2 次提交
    • 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. 03 7月, 2017 1 次提交
    • B
      Generate files with certain timestamps · 5a2ffd3f
      Benjamin Sago 提交于
      This is going to be used to test time formatting.
      
      Casualty here is that the “have you not ran the provisioning script in a year?” checker complained about there being files more than a year old, so that now has to ignore the times directory.
      5a2ffd3f
  11. 29 6月, 2017 7 次提交
    • B
      Document sorting by type · f61e3853
      Benjamin Sago 提交于
      f61e3853
    • B
      Add sorting by type · f7505364
      Benjamin Sago 提交于
      This isn’t perfect, as a file’s type isn’t cached, so it gets recomputed for every comparison in the sort! We can’t go off the file’s `st_mode` flag because it’s not guaranteed to be in any order between systems.
      f7505364
    • B
      Add a test for inode sorting · 7d1448da
      Benjamin Sago 提交于
      7d1448da
    • B
      Add sort tests for name and ext and lowercase · 098788c9
      Benjamin Sago 提交于
      098788c9
    • B
      Upcase some of the extension testcases · 9d740911
      Benjamin Sago 提交于
      These are going to be used for sort testing. Unfortunately, three existing tests that were using the lowercase versions had to be changed.
      9d740911
    • B
      Update the docs where it counts · 7e302718
      Benjamin Sago 提交于
      7e302718
    • B
      Override the names of . and .. · dd8bff08
      Benjamin Sago 提交于
      There was a problem when displaying . and .. in directory listings: their names would normalise to actual names! So instead of literally seeing `.`, you’d see the current directory’s name, inserted in sort order into the list of results. Obviously this is not what we want.
      
      In unrelated news, putting `.` and `..` into the list of paths read from a directory just takes up more heap space for something that’s basically constant.
      
      We can solve both these problems at once by moving the DotFilter to the files iterator in Dir, rather than at the Dir’s creation. Having the iterator know whether it should display `.` and `..` means it can emit those files first, and because it knows what those files really represent, it can override their file names to actually be those sequences of dots.
      
      This is not a perfect solution: the main casualty is that a File can now be constructed with a name, some metadata, both, or neither. This is currently handled with a bunch of Options, and returns IOResult even without doing any IO operations.
      
      But at least all the tests pass!
      dd8bff08
  12. 25 6月, 2017 2 次提交
    • B
      Fix bug where colours were incorrectly applied · 84b01f20
      Benjamin Sago 提交于
      exa assumed that the COLUMNS environment variable being present always meant that the output was to a terminal, so it should use colours. But because this variable can be overridden, colours were being incorrectly set!
      
      The ‘fix’ is to stop trying to be clever while only calculating the terminal width once, and instead just stick it in a lazy_static so it’s usable everywhere.
      84b01f20
    • B
      Tests for disabling colours · 4e90b4d7
      Benjamin Sago 提交于
      4e90b4d7
  13. 24 6月, 2017 5 次提交
  14. 30 5月, 2017 1 次提交
    • B
      xtests for higher order bits · c4447e35
      Benjamin Sago 提交于
      Finally, re-do the permissions extended tests to include the setuid, setgid, and sticky bits, and rename the last two existing ones to match the others (files with the same names as their permissions).
      c4447e35
  15. 19 5月, 2017 2 次提交
    • B
      Display device IDs when listing devices · ef5fa906
      Benjamin Sago 提交于
      Override the size column for block and charater devices, so it shows the major and minor device IDs instead (which are in the Metadata struct somewhere).
      
      This is what ls does when faced with a device.
      ef5fa906
    • B
      Don’t core dump when given invalid UTF-8 arguments · de60b958
      Benjamin Sago 提交于
      By parsing OsStrings rather than Strings, it’s the getopts crate that’s doing the UTF-8 checking rather than us, so if one of them isn’t valid, it’ll just fail to parse rather than crash exa.
      
      Also, save a few allocations here and there.
      de60b958
  16. 18 5月, 2017 2 次提交
  17. 17 5月, 2017 1 次提交
  18. 16 5月, 2017 1 次提交
    • B
      Re-prefix the paths found by following symlinks · 108a402d
      Benjamin Sago 提交于
      Fixes #134, a bug that showed symlinks incorrectly as broken, but only when the file was listed directly on the command-line *and* the file was in a different directory to the one exa was being run in.
      
      I’m not sure why the old code used `String::new()`, but it doesn’t seem to affect anything.
      108a402d