yac 1.0.2 → 1.0.3

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 (3) hide show
  1. data/lib/yac.rb +8 -3
  2. data/yac.gemspec +1 -1
  3. 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
- file = search_name(args,"Show")
164
- format_file(file)
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) : exit
218
+ file ? format_file(file) : break
214
219
  end
215
220
  end
216
221
 
data/yac.gemspec CHANGED
@@ -1,5 +1,5 @@
1
1
  GEM = "yac"
2
- VER = "1.0.2"
2
+ VER = "1.0.3"
3
3
  DATE = %q{2008-10-28}
4
4
  AUTHOR = "Jinzhu Zhang"
5
5
  EMAIL = "wosmvp@gmail.com"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yac
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jinzhu Zhang