peco_selector 0.0.5 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/peco_selector.rb +2 -1
- data/lib/peco_selector/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 520787970d8ed80048823eac0d56ddfe23fa726b
|
4
|
+
data.tar.gz: c58e1fa6c0abae080633b44d5a8f4aa257995a8d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d56b5509437ed2a37b2fc02d479282a7b477924087b335bec1515598a8f431d0b0a3f2fcaec392753a88c2a07ae727e59f4dd62e96d57584b8148dcc39b9a455
|
7
|
+
data.tar.gz: 0032fa8608a51b459ae1d4a18e937bf6ff532c6ff7d12226632e40023be8715e3eae9bf619b87e4615bee5eb149c2d21f38c7ce7bfaf224785916a515fa70b92
|
data/lib/peco_selector.rb
CHANGED
@@ -21,11 +21,12 @@ module PecoSelector
|
|
21
21
|
ensure_peco_available
|
22
22
|
|
23
23
|
prompt = options[:prompt] || "QUERY>"
|
24
|
+
query = options[:query] || ""
|
24
25
|
|
25
26
|
stdout_str = nil
|
26
27
|
stderr_str = nil
|
27
28
|
|
28
|
-
Open3.popen3(
|
29
|
+
Open3.popen3([PECO_BIN, "--null", "--prompt", prompt, "--query", query].shelljoin) do |stdin, stdout, stderr, wait_thr|
|
29
30
|
candidates.each do |display, value|
|
30
31
|
value ||= display
|
31
32
|
stdin.puts "#{display}\x00#{value.object_id}"
|
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
|
4
|
+
version: 1.0.0
|
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-
|
11
|
+
date: 2015-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|