The files are automatically generated, but using rake's `file` task does not
work correctly when the files are checked into the repo since the timestamps are
updated independently of the commit time.
Removing them ensures that these files are always freshly generated before
building the gem and thus are always up-to-date which was often not the case in
the past.
When trying to `require` a gem running in an unlinked directory, an exception is
thrown because `Dir.pwd` is called (see rubygems/rubygems#3087).
Until the fix lands in an official release, we monkey patch `Dir.pwd` to return
'/' if a `Errno::ENOENT` exception is raised while loading the colorls gem.
This should work for all Unixes. On Windows, this error cannot happen since you
cannot unlink a directory which is still in use by a process.
Fixes#351.
* add and wire up `VerticalLayout` which is now the default
* adapt flags spec to use single-column layout for testing sort order
since the output is hard to verify when in vertical format
Fixes#189.
* make `-h` an alias for `--human-readable`
* both options are simply ignored when used with an argument or another option
* running `colorls -h` still shows the help text since just as before
Both are also supported by GNU ls, although currently not all formats are
supported.
This change lays ground for implementing column based formatting and also
supports using a pager with colorls keeping the formatting intact:
`colorls --color -x | less --tabs=4 -RFX`
This option works the same as for GNU ls, although if not specified colorization
is on by default (the `auto` mode).
Using `--color` is equivalent to `--color=always`.
This generates `file://` links using ANSI escape sequences which opens the
given file using the default application for the file type on your system.
A terminal emulator supporting hyperlinks is required, otherwise the links
will be ignored.