colorls 1.1.2.pre.557 → 1.1.2.pre.560
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/colorls/flags.rb +17 -5
- data/man/colorls.1 +1 -1
- data/zsh/_colorls +0 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a1bccfaba5b026c88fe45be5ba02db3e5e3c531bc8c8b85a9694255399189f7
|
4
|
+
data.tar.gz: 5aba71c61f9af4f3821143e9385278ad6cd741aee925bfaeb1e1f52ad5c0c78d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c5de9a817827fd4446409d9603001b77189f62feea90a0d4367aa38880fd2e078328d5af7ad788afc520765718c193842dba1460711bb1ec04a36ac4de83131
|
7
|
+
data.tar.gz: 5b71d3bca61d64d1bee8e3ac4812fb90fce03dc09fc4442db6fbd3e6bdda258fedeac8e62cf386ca7ea681e57e0611ec6187772c0e4facf4e5708a0cae5175cd
|
data/lib/colorls/flags.rb
CHANGED
@@ -141,13 +141,22 @@ module ColorLS
|
|
141
141
|
options.on('--hyperlink') { @opts[:hyperlink] = true }
|
142
142
|
end
|
143
143
|
|
144
|
+
def add_compatiblity_options(options)
|
145
|
+
options.separator ''
|
146
|
+
options.separator 'options for compatiblity with ls (ignored):'
|
147
|
+
options.separator ''
|
148
|
+
options.on('-h', '--human-readable') {}
|
149
|
+
end
|
150
|
+
|
151
|
+
def show_help
|
152
|
+
puts @parser
|
153
|
+
show_examples
|
154
|
+
exit
|
155
|
+
end
|
156
|
+
|
144
157
|
def add_help_option(opts)
|
145
158
|
opts.separator ''
|
146
|
-
opts.on_tail('
|
147
|
-
puts @parser
|
148
|
-
show_examples
|
149
|
-
exit
|
150
|
-
end
|
159
|
+
opts.on_tail('--help', 'prints this help') { show_help }
|
151
160
|
end
|
152
161
|
|
153
162
|
def show_examples
|
@@ -192,6 +201,9 @@ EXAMPLES
|
|
192
201
|
end
|
193
202
|
end
|
194
203
|
|
204
|
+
# show help and exit if the only argument is -h
|
205
|
+
show_help if !@args.empty? && @args.all? { |arg| arg == '-h' }
|
206
|
+
|
195
207
|
@parser.parse!(@args)
|
196
208
|
|
197
209
|
set_color_opts
|
data/man/colorls.1
CHANGED
data/zsh/_colorls
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: colorls
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.2.pre.
|
4
|
+
version: 1.1.2.pre.560
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Athitya Kumar
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-03-
|
11
|
+
date: 2019-03-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clocale
|