irb 1.3.8.pre.1 → 1.3.8.pre.2

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
  SHA256:
3
- metadata.gz: 98ac31009e423fdea5f0151f5b48e3199dc98427484d5465088e1a9e0bac88fd
4
- data.tar.gz: 180d9637906858acb3abba279ee49934d397979da0f4e9e7fab373c4d7313d4d
3
+ metadata.gz: 6917cc502c36eee80046354a84e97d8584ab167edc657871f04c7f7a70491601
4
+ data.tar.gz: 3dedb3a1d6fab3a6cafd09a033ae76f6bbf982e18a886390dbb90b1c91d12180
5
5
  SHA512:
6
- metadata.gz: 89acce9899ac0fefa699639a514ada88bb2b9e3c18e3a1b5f83e139800d99b18445269ef5703b45c794f69a186c99cfd4f02fbfd24a883ed2164c9d1eacceb21
7
- data.tar.gz: a16a4ba0f9505da943a29a6138b29b8d92e9fff6cad5fcea14ca3666095d0e02b467eaaf83eb425b4da4971c047b10eab73ba28bde5794d2e46f58d67476a182
6
+ metadata.gz: 6a273f5107f23d828fdf485c5c58b110f6e066f3b020dacf5e7c7d8d751eb57e4e573f4026eb7be0494125d6a2665e1a1a13c53400ac50358645cfcec34e49f5
7
+ data.tar.gz: d7f30a0664d8adec1656348706c02b8ceca27194a01f6de760b9f39c051e98eccb1891bd84cf3add8dbef7575023c877b47f9301274e80af6a776f83e77071ee
data/doc/irb/irb.rd.ja CHANGED
@@ -56,6 +56,8 @@ irbの使い方は, Rubyさえ知っていればいたって簡単です. 基本
56
56
  用しようとする.
57
57
  --colorize 色付けを利用する.
58
58
  --nocolorize 色付けを利用しない.
59
+ --autocomplete オートコンプリートを利用する.
60
+ --noautocomplete オートコンプリートを利用しない.
59
61
  --prompt prompt-mode
60
62
  --prompt-mode prompt-mode
61
63
  プロンプトモードを切替えます. 現在定義されているプ
data/irb.gemspec CHANGED
@@ -36,5 +36,5 @@ Gem::Specification.new do |spec|
36
36
 
37
37
  spec.required_ruby_version = Gem::Requirement.new(">= 2.5")
38
38
 
39
- spec.add_dependency "reline", ">= 0.2.8.pre.1"
39
+ spec.add_dependency "reline", ">= 0.2.8.pre.3"
40
40
  end
data/lib/irb/context.rb CHANGED
@@ -54,6 +54,7 @@ module IRB
54
54
  @use_multiline = nil
55
55
  end
56
56
  @use_colorize = IRB.conf[:USE_COLORIZE]
57
+ @use_autocomplete = IRB.conf[:USE_AUTOCOMPLETE]
57
58
  @verbose = IRB.conf[:VERBOSE]
58
59
  @io = nil
59
60
 
@@ -185,6 +186,8 @@ module IRB
185
186
  #
186
187
  # A copy of the default <code>IRB.conf[:USE_COLORIZE]</code>
187
188
  attr_reader :use_colorize
189
+ # A copy of the default <code>IRB.conf[:USE_AUTOCOMPLETE]</code>
190
+ attr_reader :use_autocomplete
188
191
  # A copy of the default <code>IRB.conf[:INSPECT_MODE]</code>
189
192
  attr_reader :inspect_mode
190
193
 
@@ -311,6 +314,8 @@ module IRB
311
314
  alias use_readline? use_singleline
312
315
  # Alias for #use_colorize
313
316
  alias use_colorize? use_colorize
317
+ # Alias for #use_autocomplete
318
+ alias use_autocomplete? use_autocomplete
314
319
  # Alias for #rc
315
320
  alias rc? rc
316
321
  alias ignore_sigint? ignore_sigint
data/lib/irb/init.rb CHANGED
@@ -45,6 +45,7 @@ module IRB # :nodoc:
45
45
 
46
46
  @CONF[:USE_SINGLELINE] = false unless defined?(ReadlineInputMethod)
47
47
  @CONF[:USE_COLORIZE] = !ENV['NO_COLOR']
48
+ @CONF[:USE_AUTOCOMPLETE] = true
48
49
  @CONF[:INSPECT_MODE] = true
49
50
  @CONF[:USE_TRACER] = false
50
51
  @CONF[:USE_LOADER] = false
@@ -274,6 +275,10 @@ module IRB # :nodoc:
274
275
  @CONF[:USE_COLORIZE] = true
275
276
  when "--nocolorize"
276
277
  @CONF[:USE_COLORIZE] = false
278
+ when "--autocomplete"
279
+ @CONF[:USE_AUTOCOMPLETE] = true
280
+ when "--noautocomplete"
281
+ @CONF[:USE_AUTOCOMPLETE] = false
277
282
  when /^--prompt-mode(?:=(.+))?/, /^--prompt(?:=(.+))?/
278
283
  opt = $1 || argv.shift
279
284
  prompt_mode = opt.upcase.tr("-", "_").intern
@@ -295,6 +295,10 @@ module IRB
295
295
  end
296
296
  end
297
297
  Reline.dig_perfect_match_proc = IRB::InputCompletor::PerfectMatchedProc
298
+ Reline.autocompletion = IRB.conf[:USE_AUTOCOMPLETE]
299
+ if IRB.conf[:USE_AUTOCOMPLETE]
300
+ Reline.add_dialog_proc(:show_doc, SHOW_DOC_DIALOG, Reline::DEFAULT_DIALOG_CONTEXT)
301
+ end
298
302
  end
299
303
 
300
304
  def check_termination(&block)
@@ -361,7 +365,6 @@ module IRB
361
365
  Reline.output = @stdout
362
366
  Reline.prompt_proc = @prompt_proc
363
367
  Reline.auto_indent_proc = @auto_indent_proc if @auto_indent_proc
364
- Reline.add_dialog_proc(:show_doc, SHOW_DOC_DIALOG, Reline::DEFAULT_DIALOG_CONTEXT)
365
368
  if l = readmultiline(@prompt, false, &@check_termination_proc)
366
369
  HISTORY.push(l) if !l.empty?
367
370
  @line[@line_no += 1] = l + "\n"
@@ -30,6 +30,8 @@ Usage: irb.rb [options] [programfile] [arguments]
30
30
  --nosingleline Don't use singleline editor module
31
31
  --colorize Use colorization
32
32
  --nocolorize Don't use colorization
33
+ --autocomplete Use autocompletion
34
+ --noautocomplete Don't use autocompletion
33
35
  --prompt prompt-mode/--prompt-mode prompt-mode
34
36
  Switch prompt mode. Pre-defined prompt modes are
35
37
  `default', `simple', `xmp' and `inf-ruby'
@@ -29,6 +29,8 @@ Usage: irb.rb [options] [programfile] [arguments]
29
29
  --nosingleline シングルラインエディタを利用しない.
30
30
  --colorize 色付けを利用する.
31
31
  --nocolorize 色付けを利用しない.
32
+ --autocomplete オートコンプリートを利用する.
33
+ --noautocomplete オートコンプリートを利用しない.
32
34
  --prompt prompt-mode/--prompt-mode prompt-mode
33
35
  プロンプトモードを切替えます. 現在定義されているプ
34
36
  ロンプトモードは, default, simple, xmp, inf-rubyが
data/lib/irb/version.rb CHANGED
@@ -11,7 +11,7 @@
11
11
  #
12
12
 
13
13
  module IRB # :nodoc:
14
- VERSION = "1.3.8.pre.1"
14
+ VERSION = "1.3.8.pre.2"
15
15
  @RELEASE_VERSION = VERSION
16
- @LAST_UPDATE_DATE = "2021-08-29"
16
+ @LAST_UPDATE_DATE = "2021-08-30"
17
17
  end
data/lib/irb.rb CHANGED
@@ -72,6 +72,8 @@ require_relative "irb/easter-egg"
72
72
  # --nosingleline Don't use singleline editor module
73
73
  # --colorize Use colorization
74
74
  # --nocolorize Don't use colorization
75
+ # --autocomplete Use autocompletion
76
+ # --noautocomplete Don't use autocompletion
75
77
  # --prompt prompt-mode/--prompt-mode prompt-mode
76
78
  # Switch prompt mode. Pre-defined prompt modes are
77
79
  # `default', `simple', `xmp' and `inf-ruby'
@@ -114,6 +116,7 @@ require_relative "irb/easter-egg"
114
116
  # IRB.conf[:USE_SINGLELINE] = nil
115
117
  # IRB.conf[:USE_COLORIZE] = true
116
118
  # IRB.conf[:USE_TRACER] = false
119
+ # IRB.conf[:USE_AUTOCOMPLETE] = true
117
120
  # IRB.conf[:IGNORE_SIGINT] = true
118
121
  # IRB.conf[:IGNORE_EOF] = false
119
122
  # IRB.conf[:PROMPT_MODE] = :DEFAULT
data/man/irb.1 CHANGED
@@ -18,6 +18,7 @@
18
18
  .Op Fl - Ns Oo no Oc Ns singleline
19
19
  .Op Fl - Ns Oo no Oc Ns echo
20
20
  .Op Fl - Ns Oo no Oc Ns colorize
21
+ .Op Fl - Ns Oo no Oc Ns autocomplete
21
22
  .Op Fl - Ns Oo no Oc Ns verbose
22
23
  .Op Fl -prompt Ar mode
23
24
  .Op Fl -prompt-mode Ar mode
@@ -118,6 +119,13 @@ Use colorization.
118
119
  Don't use colorization.
119
120
  .Pp
120
121
  .Pp
122
+ .It Fl -autocomplete
123
+ Use autocompletion.
124
+ .Pp
125
+ .It Fl -noautocomplete
126
+ Don't use autocompletion.
127
+ .Pp
128
+ .Pp
121
129
  .It Fl -verbose
122
130
  Show details.
123
131
  .Pp
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: irb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.8.pre.1
4
+ version: 1.3.8.pre.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keiju ISHITSUKA
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.2.8.pre.1
19
+ version: 0.2.8.pre.3
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 0.2.8.pre.1
26
+ version: 0.2.8.pre.3
27
27
  description: Interactive Ruby command-line tool for REPL (Read Eval Print Loop).
28
28
  email:
29
29
  - keiju@ruby-lang.org