wosmvp-yac 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/yac.rb +8 -3
- data/yac.gemspec +1 -1
- metadata +1 -1
data/lib/yac.rb
CHANGED
@@ -160,8 +160,10 @@ module Yac
|
|
160
160
|
end
|
161
161
|
|
162
162
|
def show_single(args)
|
163
|
-
|
164
|
-
|
163
|
+
loop do
|
164
|
+
file = search_name(args,"Show")
|
165
|
+
file ? format_file(file) : break
|
166
|
+
end
|
165
167
|
end
|
166
168
|
|
167
169
|
def rm_single(args)
|
@@ -189,6 +191,9 @@ module Yac
|
|
189
191
|
path.each do |x|
|
190
192
|
result.concat(`find "#{x}" -type f -iwholename '#{x}*#{args.sub(/^@/,'').strip}*' -not -iwholename '*.git*'| sed 's/^.*\\(private\\|main\\)\\//#{x=~/main/ ? '@':'' }/'`.to_a)
|
191
193
|
end
|
194
|
+
#For loop show filename
|
195
|
+
(format_file(full_path(result[0]));return nil) if msg =~ /show/i && result.size == 1
|
196
|
+
|
192
197
|
return result.empty? ? (colorful("Nothing Found About < #{args} >","warn")) :
|
193
198
|
(colorful("The Results About < #{args} > To #{msg || "Operate"} :","notice");full_path(choose_one(result)))
|
194
199
|
end
|
@@ -210,7 +215,7 @@ module Yac
|
|
210
215
|
loop do
|
211
216
|
colorful("All files Contain #{args.strip},Choose one to show","notice")
|
212
217
|
file = full_path(choose_one(all_result))
|
213
|
-
file ? format_file(file) :
|
218
|
+
file ? format_file(file) : break
|
214
219
|
end
|
215
220
|
end
|
216
221
|
|
data/yac.gemspec
CHANGED