DirTagger 2.0.1 → 2.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/dir_tagger.rb +7 -6
- metadata +3 -3
data/lib/dir_tagger.rb
CHANGED
@@ -99,7 +99,8 @@ module DirTagger # :nodoc:
|
|
99
99
|
# ToDo => Support listing all saved keys
|
100
100
|
# List all or specified tags
|
101
101
|
opts.on('-t', '--tags [pattern1, ..]', Array, '') do |pattern|
|
102
|
-
options.actions.push :list_tags
|
102
|
+
# options.actions.push :list_tags
|
103
|
+
options.actions.push :get_tag
|
103
104
|
pattern = pattern.nil? ? '' : pattern
|
104
105
|
options.pattern = pattern
|
105
106
|
end
|
@@ -112,7 +113,7 @@ module DirTagger # :nodoc:
|
|
112
113
|
end
|
113
114
|
|
114
115
|
opts.on('-v', '--version', 'List current TagDir Version') do
|
115
|
-
puts '2.0.
|
116
|
+
puts '2.0.2'
|
116
117
|
exit
|
117
118
|
end
|
118
119
|
|
@@ -199,7 +200,7 @@ module DirTagger # :nodoc:
|
|
199
200
|
|
200
201
|
def tag_dir_printer(dir_taggers, prefix = 0)
|
201
202
|
dir_taggers.each do |dt|
|
202
|
-
puts sprintf("\e[032m
|
203
|
+
puts ' ' * prefix + sprintf("\e[032m%-#{dir_taggers.max_tag_length}s\e[0m %s", dt.tag, dt.dir)
|
203
204
|
tag_dir_printer dt.children, dir_taggers.max_tag_length + prefix
|
204
205
|
end
|
205
206
|
end
|
@@ -212,9 +213,9 @@ module DirTagger # :nodoc:
|
|
212
213
|
#
|
213
214
|
# end
|
214
215
|
|
215
|
-
|
216
|
-
|
217
|
-
|
216
|
+
def get_tag
|
217
|
+
puts profile_parser(options.pattern, 0).last
|
218
|
+
end
|
218
219
|
|
219
220
|
def get_dir
|
220
221
|
puts profile_parser(options.tags, 1)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: DirTagger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-08-22 00:00:00.
|
12
|
+
date: 2012-08-22 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: ! 'A gem saving some frequent used paths and keeping them at hand, both
|
15
15
|
in a very ease and comportable way. The concept is to give your directory a tag,
|
@@ -45,7 +45,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
45
45
|
version: '0'
|
46
46
|
requirements: []
|
47
47
|
rubyforge_project:
|
48
|
-
rubygems_version: 1.8.
|
48
|
+
rubygems_version: 1.8.24
|
49
49
|
signing_key:
|
50
50
|
specification_version: 3
|
51
51
|
summary: ! '*nix system file system helper'
|