peco_selector 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 377f5266c991dde84cbaf9437a5ff8ddf085ae20
4
- data.tar.gz: 119f8c601ebea5e434d00dc42f5a461e25fe3f5d
3
+ metadata.gz: eeb3f824d41626e0fbd5a587e8807f5eedd8b3e8
4
+ data.tar.gz: 9eb58646aee69a1618d32006c7bacf2f00e4e349
5
5
  SHA512:
6
- metadata.gz: fbb85be1124ab30d0c4c5ac24627df3576ae62753bf2c072f7f6c6a62eb89db5b8c752884851965e9c30f4bdbf5cc3b9f4a85d21b2b73973fef556969698df10
7
- data.tar.gz: eda13b07a001d535565ae7e813ba7bacb9217499882be0b1c7913935ec385b316a584f7a6584a8485e50f1c3943642602ef37163361c44946a371901c6efab3e
6
+ metadata.gz: cd312aa1c0d9e2af4ea4bc2ecaff698064e8f51e11fc6b6b8d43d7bbf5426f6631402e478d489dc77809dfb731283e357eb53fd4df29bc2025f08dc598ec73eb
7
+ data.tar.gz: b1ea515cd879c1d5829b3d754840b3875d51da06244f3ac584eba72e81b528f5f0e6c01b36720e23a0c41c7d06de4a7d61dd675cf1db94f9cb98ed044ed384dd
@@ -19,6 +19,7 @@ module PecoSelector
19
19
 
20
20
  Open3.popen3("#{PECO_BIN} --null --prompt #{Shellwords.escape(prompt)}") do |stdin, stdout, stderr, wait_thr|
21
21
  candidates.each do |display, value|
22
+ value ||= display
22
23
  stdin.puts "#{display}\x00#{value.object_id}"
23
24
  end
24
25
  stdin.close
@@ -35,8 +36,8 @@ module PecoSelector
35
36
 
36
37
  object_ids = stdout_str.strip.split("\n").map(&:to_i)
37
38
 
38
- candidates.map do |_, value|
39
- value
39
+ candidates.map do |display, value|
40
+ value || display
40
41
  end.select do |value|
41
42
  object_ids.include?(value.object_id)
42
43
  end
@@ -1,3 +1,3 @@
1
1
  module PecoSelector
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: peco_selector
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryota Arai
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-12 00:00:00.000000000 Z
11
+ date: 2015-05-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler