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.
These special permission bits should cause the executable bit in the current
group to be replaced with an uppercase letter if the executable bit itself is
*not* set, with a lower case character otherwise.
In a long listing, the user was only shown when owning the file. Originally, the
user was only colorized when owning the file.
Change that to always colorize the user using the defined `:user` color.
Fixes#187.
In the `-z` git status format, a NUL follows each file name. When files are
renamed, the status field is followed by a space, the "to" path, a NUL
character, the "from" path and a terminating NUL.
This fixes#185.
* no longer traverse complete directory trees to determine git status for
directories
* properly report status for folders with changed files
* skip the parent folder since we do not have git status about it
* add `--sort=WORD` option, which sorts by modification "time" or not at all
* add short option `-U` to mean `--sort=none` (`ls` compatibility)
* `-t` now has the same effect as `--sort=time` which is also mentioned in the
post install mesage
* add checks for `--sort=time` and `--sort=none` to .travis.yml
If there are a lot of arguments, e.g. due to shell globbing, one might easily
lose track of which output corresponds to which argument.
Again, this is similar to what `ls` does.
When not using any sort options, sort the output by name.
This is in line with what `ls` does, too.
Revert "Disable failing test"
This reverts commit 9e41d60956.
* Fix handling of `--tree` and `--all` / `--allmost_all` flags
When using `:tree` mode, the `:allmost_all` was always enabled unconditionally.
* Add example for combining short options
* Allow specifying mutual exlusive flags
Warning about flags that seem mutual exclusive prevents using default
flags in Shell aliases which later could be overriden.
When parsing the command line options, the last given option for a
setting (think "mode") or (light vs. dark) counts.
Since colorls errors out when `--tree` is used together with `--all`, the
`--all` option is relaxed to `--almost-all`.
This is exactly how it works for `ls` and e.g. the famous curl tool.
Related to #103, in order to make colorls more compatible to `ls`.
* Fix rubocop error: sort dependencies
```
Offenses:
colorls.gemspec:25:3: C: Gemspec/OrderedDependencies: Dependencies should be sorted in an alphabetical order within their section of the gemspec. Dependency filesize should appear before ruby-terminfo.
spec.add_runtime_dependency 'filesize'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
colorls.gemspec:32:3: C: Gemspec/OrderedDependencies: Dependencies should be sorted in an alphabetical order within their section of the gemspec. Dependency diffy should appear before rubocop.
spec.add_development_dependency 'diffy'
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
```
* Revert commit d3e0cd3bb8
The help will be generated automatically.
* Use optparse module for options parsing
Use the `optparse` module instead of open coding the options parsing.
It can automatically generate a help message about available options, can
generate completion code for Bash and Zsh and also supports clubbed flags like
GNU's `getopt`.
* Added clubbed flags and renamed multi-character shorthand arguments to not interfere with clubbed flags
* Cleaned up code
* Fixed parsing arguments without dash
* Made -h flag clubbable
* Minor text fixes
* Cleaned up incompatible flags method
* Add some icons for folders
* Folder names: .atom, .vscode, .github
* Add/Fix some file icons
* New icons:
- React: .jsx
- SASS: .sass
* Fixed aliases:
- .editorconfig: It was a 'git' icon, which makes no sense
- sass/scss: SCSS is not SASS
* New aliases:
- Stylus: .stylus → .styl
- Video: .avi, .mkv, .ogv, .webm → video
- React: .tsx → .jsx
* Fix alphabetic order
The elements in `@contents` should only ever be names of directory entries.
Otherwise erroneous paths will be constructed with `@input/@content_entry`.
* add check to ensure that long listing prints information about `.hidden-file`
Fixes#104.
* added help flag
* updated .travis.yml
* added the list of all use-case commands
* changed rubocop
* made the necessary minor changes in helplog method and changed rubocop
* add colors.yaml file and switch any color reference to use it in
`lib/colors/core.rb`
* add light and dark verions of the commands, also moved load_from_yaml
* fix typo
* add colors for new commands from the merge
* fix name and update colors for the light and dark scheme
* fixed small typo when no files are found
* Add entry to files.yaml to handle .log file
* Update files.yaml, correcting a typo in log entry
* Update on core.rb, to check if the directory is empty
* Update on core.rb, rewrote test, because Travis saw it as an offense
* Update on core.rb, typo in my test
* Update core.rb, switch error message on empty folder