colorls 1.1.2.pre.557 → 1.1.2.pre.560

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ed1767483b77510e8c8cc835d5473bd292bf89a6cacf40e6102888eb57564539
4
- data.tar.gz: edb9edf997d588639534ec82bdc22339fabd55402761f44f2bbdce2beea36a7e
3
+ metadata.gz: 1a1bccfaba5b026c88fe45be5ba02db3e5e3c531bc8c8b85a9694255399189f7
4
+ data.tar.gz: 5aba71c61f9af4f3821143e9385278ad6cd741aee925bfaeb1e1f52ad5c0c78d
5
5
  SHA512:
6
- metadata.gz: 22f3b7dbbb858b6b9d4b6d18c1fc6113158f8bde7a9899959f5eb777b404ddd8ba5779428f64d981e95b14ebaf1e91facc13cae39008ccb6d7c2fc490a15af34
7
- data.tar.gz: be6c052a532e51b2b45059f2c6f3c6cb1c3fa015b5c3dae7810a248563d1531fb1f58ce34e6e736b3eb56680696e93d610e7325d167c2ff643d98defb0ca10ce
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('-h', '--help', 'prints this help') do
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
@@ -115,7 +115,7 @@ use dark color scheme
115
115
 
116
116
  .
117
117
  .TP
118
- \fB\-h\fR, \fB\-\-help\fR
118
+ \fB\-\-help\fR
119
119
  prints this help
120
120
  .
121
121
  .TP
data/zsh/_colorls CHANGED
@@ -37,7 +37,6 @@ _arguments -s -S \
37
37
  "--light[use light color scheme]" \
38
38
  "--dark[use dark color scheme]" \
39
39
  "--hyperlink[]" \
40
- "-h[prints this help]" \
41
40
  "--help[prints this help]" \
42
41
  "--version[show version]" \
43
42
  '*:file:_files' && return 0
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.557
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-12 00:00:00.000000000 Z
11
+ date: 2019-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: clocale