rcd 0.0.1 → 0.0.2

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.
Files changed (2) hide show
  1. data/lib/rcd.rb +13 -7
  2. metadata +1 -1
data/lib/rcd.rb CHANGED
@@ -22,23 +22,29 @@ class Rcd # :nodoc:
22
22
  argv.delete("#{key},#{path}")
23
23
  end
24
24
 
25
- opts.on('--add-pwd key', :REQUIRED, String, 'Add $(pwd) and a key in rcd_profile') do |key|
25
+ opts.on('-p', '--add-pwd [key]', :REQUIRED, String, 'Add $(pwd) and a key in rcd_profile') do |key|
26
26
  options.key = key
27
27
  options.path = Dir.pwd
28
28
  options.add_new_path = true
29
- agv.delete('--add-pwd')
30
- agv.delete(key)
29
+ argv.delete('-p')
30
+ argv.delete('--add-pwd')
31
+ argv.delete(key)
31
32
  end
32
33
 
33
- opts.on('-l', 'List all the saved paths') do
34
+ opts.on('-l', '--list', 'List all the saved paths') do
34
35
  options.list_all = true
35
36
  argv.delete('-l')
36
37
  end
37
38
 
38
- opts.on('-h', 'Display help message') do
39
+ opts.on('-h', '--help', 'Display help message') do
39
40
  p opts
40
41
  exit
41
42
  end
43
+
44
+ # opts.on('-v', '--version', 'Display help message') do
45
+ # p opts
46
+ # exit
47
+ # end
42
48
  end).parse(argv)
43
49
 
44
50
  list_all_saved_paths if options.list_all
@@ -51,9 +57,9 @@ class Rcd # :nodoc:
51
57
  puts "\e[031m Not Paths Saved"
52
58
  exit
53
59
  end
54
- puts ' All the saved paths:'
60
+ puts 'All the saved paths:'
55
61
  profile.each_line do |l|
56
- puts(sprintf(" \e[032m%10s\e[0m %s", *l.split(','))) unless l.match(/\^n/)
62
+ puts(sprintf("\e[032m%10s\e[0m %s", *l.split(','))) unless l.match(/\^n/)
57
63
  end
58
64
  end
59
65
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rcd
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: