colorls 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +8 -7
- data/CONTRIBUTING.md +2 -2
- data/README.md +20 -8
- data/lib/colorls/core.rb +4 -1
- data/lib/colorls/flags.rb +1 -0
- data/lib/colorls/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee46843601bfbf8dcda5a4cf90aec6208053193b
|
4
|
+
data.tar.gz: efb20ac3426e5a0c4ebb0104ca1902559e41cda9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 62cded3301273f822645fd013b63b71e6350d0599f7f4f521b7bfeb0c57fc6a292c698163d832f00949b9f91066889e810cb1fe7a0db85cce223e2871aca7331
|
7
|
+
data.tar.gz: 4e79f2693b6272e4bd86f7c7190b5e226674d1126736f4e35eeafd55e48800cb505e28b8657d44339b6e44465f51d7541bdadc6fdf437f73d405f1db3f6f2342
|
data/.travis.yml
CHANGED
@@ -11,13 +11,14 @@ script:
|
|
11
11
|
- bundle exec rubocop
|
12
12
|
- bundle exec rspec
|
13
13
|
- rake install
|
14
|
-
-
|
15
|
-
-
|
16
|
-
-
|
17
|
-
-
|
18
|
-
-
|
19
|
-
-
|
20
|
-
-
|
14
|
+
- colorls
|
15
|
+
- colorls -a
|
16
|
+
- colorls -d
|
17
|
+
- colorls -f
|
18
|
+
- colorls -sd
|
19
|
+
- colorls -sf
|
20
|
+
- colorls -1
|
21
|
+
- colorls -r
|
21
22
|
|
22
23
|
install:
|
23
24
|
- gem install bundler
|
data/CONTRIBUTING.md
CHANGED
@@ -25,10 +25,10 @@ Please proceed with a Pull Request only after you're assigned. It'd be sad if yo
|
|
25
25
|
- adding better icons to [YAML files](lib/yaml/)
|
26
26
|
- adding more flag options to the ruby gem.
|
27
27
|
|
28
|
-
3. (Optional) To test whether `
|
28
|
+
3. (Optional) To test whether `colorls` executable is working properly, do
|
29
29
|
```sh
|
30
30
|
rake install
|
31
|
-
|
31
|
+
colorls # start using colorls
|
32
32
|
```
|
33
33
|
|
34
34
|
4. (Required for YAML file changes) These are the specifications for the YAML files -
|
data/README.md
CHANGED
@@ -12,8 +12,9 @@ A Ruby script that colorizes the `ls` output with color and icons. Here are the
|
|
12
12
|
# Table of contents
|
13
13
|
|
14
14
|
- [Usage](#usage)
|
15
|
-
- [
|
16
|
-
- [
|
15
|
+
- [Installation](#installation)
|
16
|
+
- [Recommended configurations](#recommended-configurations)
|
17
|
+
- [Updating](#updating)
|
17
18
|
- [Uninstallation](#uninstallation)
|
18
19
|
- [Contributing](#contributing)
|
19
20
|
- [License](#license)
|
@@ -54,7 +55,10 @@ A Ruby script that colorizes the `ls` output with color and icons. Here are the
|
|
54
55
|
[(Back to top)](#table-of-contents)
|
55
56
|
|
56
57
|
1. Install Ruby (prefably, version > 2.1)
|
57
|
-
2. Install the patched fonts of powerline nerd-font and/or font-awesome.
|
58
|
+
2. Install the patched fonts of powerline nerd-font and/or font-awesome. Have a look at [nerdfont's README](https://github.com/ryanoasis/nerd-fonts/blob/master/readme.md) for more installation instructions.
|
59
|
+
|
60
|
+
*Note for `iTerm2` users - Please enable the nerd-font at iTerm2 > Preferences > Profiles > Text > Non-Ascii font > Knack Regular Nerd Font Complete.*
|
61
|
+
|
58
62
|
3. Install the [colorls](https://rubygems.org/gems/colorls/) ruby gem with `gem install colorls`
|
59
63
|
|
60
64
|
*Note for `rbenv` users - In case of load error when using `lc`, please try the below patch.*
|
@@ -64,15 +68,15 @@ A Ruby script that colorizes the `ls` output with color and icons. Here are the
|
|
64
68
|
rehash
|
65
69
|
```
|
66
70
|
|
67
|
-
4. Start using `
|
71
|
+
4. Start using `colorls` :tada:
|
68
72
|
|
69
|
-
#
|
73
|
+
# Recommended configurations
|
70
74
|
|
71
75
|
[(Back to top)](#table-of-contents)
|
72
76
|
|
73
|
-
1. To add some flag options
|
77
|
+
1. To add some short command (say, `lc`) with some flag options (say, `-r`)b y default, add this to your shell configuration file (`~/.bashrc`, `~/.zshrc` or `~/.fishrc`) :
|
74
78
|
```sh
|
75
|
-
alias lc='
|
79
|
+
alias lc='colorls -r'
|
76
80
|
```
|
77
81
|
2. For changing the icon(s) to other unicode icons of choice (select icons from [here](https://nerdfonts.com/)), change the YAML files in a text editor of your choice (say, `subl`)
|
78
82
|
|
@@ -80,7 +84,15 @@ A Ruby script that colorizes the `ls` output with color and icons. Here are the
|
|
80
84
|
subl $(gem which colorls)/../yaml/
|
81
85
|
```
|
82
86
|
|
83
|
-
|
87
|
+
# Updating
|
88
|
+
|
89
|
+
[(Back to top)](#table-of-contents)
|
90
|
+
|
91
|
+
Want to update to the latest version of `colorls`?
|
92
|
+
|
93
|
+
```sh
|
94
|
+
gem update colorls
|
95
|
+
```
|
84
96
|
|
85
97
|
# Uninstallation
|
86
98
|
|
data/lib/colorls/core.rb
CHANGED
@@ -1,8 +1,10 @@
|
|
1
1
|
module ColorLS
|
2
2
|
class Core
|
3
|
-
def initialize(input=nil,
|
3
|
+
def initialize(input=nil, all: false, report: false, sort: false, show: false,
|
4
|
+
one_per_line: false)
|
4
5
|
@input = input || Dir.pwd
|
5
6
|
@count = {folders: 0, recognized_files: 0, unrecognized_files: 0}
|
7
|
+
@all = all
|
6
8
|
@report = report
|
7
9
|
@sort = sort
|
8
10
|
@show = show
|
@@ -29,6 +31,7 @@ module ColorLS
|
|
29
31
|
def init_contents
|
30
32
|
@contents = Dir.entries(@input) - %w[. ..]
|
31
33
|
|
34
|
+
@contents.keep_if { |x| !x.start_with? '.' } unless @all
|
32
35
|
filter_contents if @show
|
33
36
|
sort_contents if @sort
|
34
37
|
|
data/lib/colorls/flags.rb
CHANGED
data/lib/colorls/version.rb
CHANGED