1. 30 10月, 2016 9 次提交
    • B
      File size colours on a scale · 86065f83
      Ben S 提交于
      This adds an option (always on at the moment) to use a colour scale of green to yellow to orange for the file size field instead of always green. See #65.
      86065f83
    • B
      Prepare to make the size colour take an argument · 91e8ef5c
      Ben S 提交于
      This makes the Colours value pick a colour based on the size of the file, instead of necessarily having them all green. (They are all green for now, though.)
      91e8ef5c
    • B
      Remember to add ignore-glob to the help · 93f8ad27
      Ben S 提交于
      93f8ad27
    • B
      Basic glob ignoring · 95596297
      Ben S 提交于
      See #97 and recently #130 too.
      
      This allows the user to pass in options such as "--ignore '*.pyc'" to not list any files ending in '.pyc' in the output. It uses the Rust glob crate and currently does a simple split on pipe, without any escaping, so it’s not really *complete*, but is at least something.
      95596297
    • B
      Make the views non-Copy · a6712994
      Ben S 提交于
      This has to be done for when ignore patterns get introduced and have to be stored in a Vec.
      a6712994
    • B
      Properly handle errors when following a symlink · 74358c18
      Ben S 提交于
      Fixes #123. The code assumes that every File that has its link_target() method called would first have been checked to make sure it’s actually a link first. Unfortunately it also assumed that the only thing that can go wrong while following a link is if the file wasn’t a link, meaning it crashes when given a link it doesn’t have permission to follow.
      
      This makes the file_target() method able to return either a file or path for displaying, as before, but also an IO error for when things go wrong.
      74358c18
    • B
      This lint flag started to cause all kinds of fuss · dcc17b1d
      Ben S 提交于
      dcc17b1d
    • B
      Add .tgz to the compressed file extensions · 36d9b684
      Ben S 提交于
      Fixes #129
      36d9b684
    • B
      Only engage the view when there are files to show · a7e3456b
      Ben S 提交于
      This changes the way that views are used to display the actual lists of files. It used to pass empty vectors to the view methods, which most of the time would not print anything because there are no files to list — except when there’s a header row which gets printed for no files.
      
      By not calling the view method at all when there’s nothing to print, exa won’t ever print extra things in the view unless it needs to for a file.
      
      This fixes #106 “Don’t print the header if the result set is empty”
      a7e3456b
  2. 29 8月, 2016 1 次提交
    • B
      Add legal values to error messages · 7e15e0dd
      Brandon W Maister 提交于
      Now when you do `--sort time` instead of saying "unknown option --sort
      time" it will say "unknown options '--sort time' (choices: name...)"
      with all legal options.
      
      This also adds the legal values to the default help text.
      7e15e0dd
  3. 31 7月, 2016 1 次提交
  4. 30 7月, 2016 1 次提交
  5. 14 6月, 2016 1 次提交
  6. 11 6月, 2016 2 次提交
  7. 03 5月, 2016 1 次提交
  8. 19 4月, 2016 2 次提交
    • B
      Convert exa into a library · 110a1c71
      Benjamin Sago 提交于
      This commit removes the 'main' function present in main.rs, renames it to exa.rs, and puts the 'main' function in its own binary. This, I think, makes it more clear how the program works and where the main entry point is.
      
      Librarification also means that we can start testing as a whole. Two tests have been added that test everything, passing in raw command-line arguments then comparing against the binary coloured text that gets produced.
      
      Casualties include having to specifically mark some code blocks in documentation as 'tests', as rustdoc kept on trying to execute my ANSI art.
      110a1c71
    • B
      Change views to print to a Writer, not stdout · a02f37cb
      Benjamin Sago 提交于
      This will mean that we can test exa's output as a whole, without having to rely on process or IO or anything like that.
      a02f37cb
  9. 18 4月, 2016 3 次提交
  10. 17 4月, 2016 7 次提交
  11. 12 4月, 2016 1 次提交
    • B
      Print the parent path for passed-in files · 9b87ef1d
      Benjamin Sago 提交于
      This commit changes all the views to accommodate printing each path's prefix, if it has one.
      
      Previously, each file was stripped of its ancestry, leaving only its file name to be displayed. So running "exa /usr/bin/*" would display only filenames, while running "ls /usr/bin/*" would display each file prefixed with "/usr/bin/". But running "ls /usr/bin/" -- without the glob -- would run ls on just the directory, printing out the file names with no prefix or anything.
      
      This functionality turned out to be useful in quite a few situations: firstly, if the user passes in files from different directories, it would be hard to tell where they came from (especially if they have the same name, such as find | xargs). Secondly, this also applied when following symlinks, making it unclear exactly which file a symlink would be pointing to.
      
      The reason that it did it this way beforehand was that I didn't think of these use-cases, rather than for any technical reason; this new method should not have any drawbacks save making the output slightly wider in a few cases. Compatibility with ls is also a big plus.
      
      Fixes #104, and relates to #88 and #92.
      9b87ef1d
  12. 11 4月, 2016 1 次提交
  13. 06 4月, 2016 1 次提交
  14. 01 4月, 2016 3 次提交
    • B
      Always sort files the same way · f6c5c89f
      Ben S 提交于
      This fixes a bug where extra sorting options (dirs first, reverse) were not applied when listing in long mode. In other words, fixes #105.
      
      The bug occurred because the sorting function only took Files, but the details view uses File eggs that only contain Files. This commit changes the sorting function to accept anything that AsRefs to File, and impls that on both File and Egg so the same function works for both.
      f6c5c89f
    • B
      Replace deprecated raw types with libc ones · eaa799c6
      Ben S 提交于
      This limits it to stable until the APIs stabilise (weird, huh?)
      eaa799c6
    • B
      Use only the time zone data present on the system · ee4c09dd
      Ben S 提交于
      Thinking about it, it doesn't make sense to use an *external* time zone source when the program we want to compare it to, ls, uses the system one. So just use the system one.
      
      Also, handle the case where the time zone data file can't be loaded by showing the files in UTC rather than falling over and quitting.
      ee4c09dd
  15. 19 3月, 2016 1 次提交
  16. 18 3月, 2016 3 次提交
    • B
      Add --sort=Name case-insensitive sorting · 3e9616cf
      Benjamin Sago 提交于
      This uses the case-insensitive sort function in the `natord` crate to
      convert both strings to lowercase lazily, sorting them as it goes. It
      also adds tests for `--sort` in general.
      
      The case sensitivity has been made an enum so it can be reused for other
      fields (say, the file extension).
      
      See #102.
      3e9616cf
    • B
      Fix my own broken changes · d3846468
      Benjamin Sago 提交于
      - Fix visibility errors I stupidly didn't test before committing earlier
        today
      - Silence warnings about casting that were necessary for ARM
      - Update dependencies
      d3846468
    • B
      Remove unnecessary FileTypes trait · 8ef316e1
      Ben S 提交于
      8ef316e1
  17. 11 2月, 2016 2 次提交