everyday-cli-utils 1.8.4 → 1.8.5

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: 5d91beab1a1ce74081ab57134a8047ee6b6497f1
4
- data.tar.gz: a071acf57054f2d6f81434b9fd5c9c48f09cffdd
3
+ metadata.gz: 2b85fb09b8d0abe4d585f7f1ce611bc4f34ef69a
4
+ data.tar.gz: bbd3827ffeeb0dd6bdef1d6e0b458019613d0a22
5
5
  SHA512:
6
- metadata.gz: 67772a3f5c101be779fc63de1d3044180a7d1978214c4ba23e9f176236407b0958a7849d98aab5e6eec312b07a91f0225aef827e5cfba245e93f8a877d7b1b69
7
- data.tar.gz: 4ec99aec1bcef43da7bcda9f5d687670c6f2de182b0a0f220c4641442787f062c7c5e0c3233c5ee030cb4f4d43af22c52207dd271627bae434a01fbab5f0971a
6
+ metadata.gz: b8e1886399ad21bed65f8f6f48550ad97e40069fc9e40699143ef58446a2eb8e5dee0741a0b5647aa13f76282cf87342d5f859a14a45356b58b9ca2e3aae6f73
7
+ data.tar.gz: d857d3df802a6208bdb30f6d0f4d3b5ce4c61e2f633cdf2ded75405bb3251f7392f6aad9f95ccacd16b3500d606ac20bd6ca2c2e8121d57a7c0fc73fe0ae772a
@@ -27,6 +27,17 @@ module EverydayCliUtils
27
27
  block.call(val) if !options[:only] || options[:only] == (val ? :yes : :no)
28
28
  end
29
29
 
30
+ def self.ask_prefill(question, prefill)
31
+ old_hook = Readline.pre_input_hook
32
+ Readline.pre_input_hook =-> {
33
+ Readline.insert_text(prefill)
34
+ Readline.redisplay
35
+ }
36
+ rval = Readline.readline(question, true)
37
+ Readline.pre_input_hook = old_hook
38
+ rval
39
+ end
40
+
30
41
  def self.hash_to_options(hash, extra = [])
31
42
  hash.keys + extra
32
43
  end
@@ -1,3 +1,3 @@
1
1
  module EverydayCliUtils
2
- VERSION = '1.8.4'
2
+ VERSION = '1.8.5'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: everyday-cli-utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.4
4
+ version: 1.8.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Henderson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-09 00:00:00.000000000 Z
11
+ date: 2015-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler