cr.rb 3.18.2 → 3.19.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/cr +15 -4
- data/lib/cr.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dabeb694d7888667b8f6ad18823d22eb7e1bd158e62a9269de719cdf93a067ca
|
4
|
+
data.tar.gz: e212e83a3f48df3937ed3d225e3792a72218cbbddd9b758d147b65d4e97a7153
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd749eb80cab8a8b6cd59747e01808e76e2a8703de6ce4b2994703cee2e0869ed1ff272457294bb68efd238755fc45f0570745fd05ccc4abe0885f0c64030e17
|
7
|
+
data.tar.gz: ac1f296da503c11a13ea7b9e49d7a2ba31df967151da0558e5eb4aa4e48864737919ac6cc796797ee02872467da31b991192d6a55136c3c472d485a58be38c37
|
data/bin/cr
CHANGED
@@ -158,6 +158,11 @@ def add_dict(repo)
|
|
158
158
|
# Ensure the cr home dir exists
|
159
159
|
FileUtils.mkdir_p(CRYPTIC_RESOLVER_HOME)
|
160
160
|
|
161
|
+
# Simplify adding dictionary
|
162
|
+
if !repo.start_with?("https://") and !repo.start_with?("git@")
|
163
|
+
repo = "https://github.com/#{repo}.git"
|
164
|
+
end
|
165
|
+
|
161
166
|
begin
|
162
167
|
puts "cr: Adding new dictionary..."
|
163
168
|
`git -C #{CRYPTIC_RESOLVER_HOME} clone #{repo} -q`
|
@@ -237,7 +242,11 @@ def pp_info(info)
|
|
237
242
|
|
238
243
|
if see_also = info['see']
|
239
244
|
print "\n", purple("SEE ALSO ")
|
240
|
-
see_also.
|
245
|
+
if see_also.is_a?(Array)
|
246
|
+
see_also.each {|x| print underline(x),' '}
|
247
|
+
else
|
248
|
+
print underline(see_also),' '
|
249
|
+
end
|
241
250
|
puts
|
242
251
|
end
|
243
252
|
puts
|
@@ -582,15 +591,17 @@ def help
|
|
582
591
|
cr: Cryptic Resolver v#{CR_GEM_VERSION} (#{$WordCount} words: default/#{$DefaultWordCount} user/#{user_words})
|
583
592
|
|
584
593
|
usage:
|
585
|
-
|
586
|
-
cr
|
594
|
+
|
595
|
+
cr emacs => Edit macros: a feature-rich editor
|
587
596
|
cr -c => Print word count
|
588
597
|
cr -l => List local dictionaries
|
589
598
|
cr -u => Update all dictionaries
|
590
599
|
cr -a repo.git => Add a new dictionary
|
600
|
+
cr -a user/repo => Add a new dictionary on Github
|
591
601
|
cr -d cryptic_xx => Delete a dictionary
|
592
602
|
cr -s pattern => Search words matched with pattern
|
593
|
-
cr
|
603
|
+
cr -v => Print version
|
604
|
+
cr -h => Print this help
|
594
605
|
|
595
606
|
HELP
|
596
607
|
|
data/lib/cr.rb
CHANGED