diff --git a/doc/irb/irb.rd.ja b/doc/irb/irb.rd.ja index 633c08cbd..c51e0bd60 100644 --- a/doc/irb/irb.rd.ja +++ b/doc/irb/irb.rd.ja @@ -125,7 +125,6 @@ irb起動時に``~/.irbrc''を読み込みます. もし存在しない場合は IRB.conf[:PROMPT][:MY_PROMPT] = { # プロンプトモードの名前 :PROMPT_I => nil, # 通常のプロンプト - :PROMPT_N => nil, # 継続行のプロンプト :PROMPT_S => nil, # 文字列などの継続行のプロンプト :PROMPT_C => nil, # 式が継続している時のプロンプト :RETURN => " ==>%s\n" # リターン時のプロンプト @@ -140,7 +139,7 @@ OKです. IRB.conf[:PROMPT_MODE] = :MY_PROMPT -PROMPT_I, PROMPT_N, PROMPT_S, PROMPT_Cは, フォーマットを指定します. +PROMPT_I, PROMPT_S, PROMPT_Cは, フォーマットを指定します. %N 起動しているコマンド名が出力される. %m mainオブジェクト(self)がto_sで出力される. @@ -155,7 +154,6 @@ PROMPT_I, PROMPT_N, PROMPT_S, PROMPT_Cは, フォーマットを指定します. IRB.conf[:PROMPT][:DEFAULT] = { :PROMPT_I => "%N(%m):%03n:%i> ", - :PROMPT_N => "%N(%m):%03n:%i> ", :PROMPT_S => "%N(%m):%03n:%i%l ", :PROMPT_C => "%N(%m):%03n:%i* ", :RETURN => "=> %s\n" diff --git a/lib/irb.rb b/lib/irb.rb index 93ab6370e..617e4a46c 100644 --- a/lib/irb.rb +++ b/lib/irb.rb @@ -196,7 +196,6 @@ # # IRB.conf[:PROMPT_MODE][:DEFAULT] = { # :PROMPT_I => "%N(%m):%03n> ", -# :PROMPT_N => "%N(%m):%03n> ", # :PROMPT_S => "%N(%m):%03n%l ", # :PROMPT_C => "%N(%m):%03n* ", # :RETURN => "%s\n" # used to printf @@ -206,35 +205,30 @@ # # # :NULL: # # :PROMPT_I: -# # :PROMPT_N: # # :PROMPT_S: # # :PROMPT_C: # # :RETURN: | # # %s # # :DEFAULT: # # :PROMPT_I: ! '%N(%m):%03n> ' -# # :PROMPT_N: ! '%N(%m):%03n> ' # # :PROMPT_S: ! '%N(%m):%03n%l ' # # :PROMPT_C: ! '%N(%m):%03n* ' # # :RETURN: | # # => %s # # :CLASSIC: # # :PROMPT_I: ! '%N(%m):%03n:%i> ' -# # :PROMPT_N: ! '%N(%m):%03n:%i> ' # # :PROMPT_S: ! '%N(%m):%03n:%i%l ' # # :PROMPT_C: ! '%N(%m):%03n:%i* ' # # :RETURN: | # # %s # # :SIMPLE: # # :PROMPT_I: ! '>> ' -# # :PROMPT_N: ! '>> ' # # :PROMPT_S: # # :PROMPT_C: ! '?> ' # # :RETURN: | # # => %s # # :INF_RUBY: # # :PROMPT_I: ! '%N(%m):%03n> ' -# # :PROMPT_N: # # :PROMPT_S: # # :PROMPT_C: # # :RETURN: | @@ -242,7 +236,6 @@ # # :AUTO_INDENT: true # # :XMP: # # :PROMPT_I: -# # :PROMPT_N: # # :PROMPT_S: # # :PROMPT_C: # # :RETURN: |2 @@ -527,8 +520,6 @@ def eval_input f = @context.prompt_s elsif continue f = @context.prompt_c - elsif indent > 0 - f = @context.prompt_n else f = @context.prompt_i end diff --git a/lib/irb/context.rb b/lib/irb/context.rb index 43d9b5343..6d6261e60 100644 --- a/lib/irb/context.rb +++ b/lib/irb/context.rb @@ -229,8 +229,6 @@ def main # # See IRB@Customizing+the+IRB+Prompt for more information. attr_accessor :prompt_c - # See IRB@Customizing+the+IRB+Prompt for more information. - attr_accessor :prompt_n # Can be either the default IRB.conf[:AUTO_INDENT], or the # mode set by #prompt_mode= # @@ -414,7 +412,6 @@ def prompt_mode=(mode) @prompt_i = pconf[:PROMPT_I] @prompt_s = pconf[:PROMPT_S] @prompt_c = pconf[:PROMPT_C] - @prompt_n = pconf[:PROMPT_N] @return_format = pconf[:RETURN] @return_format = "%s\n" if @return_format == nil if ai = pconf.include?(:AUTO_INDENT) diff --git a/lib/irb/init.rb b/lib/irb/init.rb index ef07a5f1e..d1097b573 100644 --- a/lib/irb/init.rb +++ b/lib/irb/init.rb @@ -58,35 +58,30 @@ def IRB.init_config(ap_path) @CONF[:PROMPT] = { :NULL => { :PROMPT_I => nil, - :PROMPT_N => nil, :PROMPT_S => nil, :PROMPT_C => nil, :RETURN => "%s\n" }, :DEFAULT => { :PROMPT_I => "%N(%m):%03n> ", - :PROMPT_N => "%N(%m):%03n> ", :PROMPT_S => "%N(%m):%03n%l ", :PROMPT_C => "%N(%m):%03n* ", :RETURN => "=> %s\n" }, :CLASSIC => { :PROMPT_I => "%N(%m):%03n:%i> ", - :PROMPT_N => "%N(%m):%03n:%i> ", :PROMPT_S => "%N(%m):%03n:%i%l ", :PROMPT_C => "%N(%m):%03n:%i* ", :RETURN => "%s\n" }, :SIMPLE => { :PROMPT_I => ">> ", - :PROMPT_N => ">> ", :PROMPT_S => "%l> ", :PROMPT_C => "?> ", :RETURN => "=> %s\n" }, :INF_RUBY => { :PROMPT_I => "%N(%m):%03n> ", - :PROMPT_N => nil, :PROMPT_S => nil, :PROMPT_C => nil, :RETURN => "%s\n", @@ -94,7 +89,6 @@ def IRB.init_config(ap_path) }, :XMP => { :PROMPT_I => nil, - :PROMPT_N => nil, :PROMPT_S => nil, :PROMPT_C => nil, :RETURN => " ==>%s\n" diff --git a/test/irb/test_cmd.rb b/test/irb/test_cmd.rb index dcea020b1..74a8ab3a0 100644 --- a/test/irb/test_cmd.rb +++ b/test/irb/test_cmd.rb @@ -228,8 +228,7 @@ def test_measure DEFAULT: { PROMPT_I: '> ', PROMPT_S: '> ', - PROMPT_C: '> ', - PROMPT_N: '> ' + PROMPT_C: '> ' } }, PROMPT_MODE: :DEFAULT, @@ -258,8 +257,7 @@ def test_measure_keeps_previous_value DEFAULT: { PROMPT_I: '> ', PROMPT_S: '> ', - PROMPT_C: '> ', - PROMPT_N: '> ' + PROMPT_C: '> ' } }, PROMPT_MODE: :DEFAULT, @@ -286,8 +284,7 @@ def test_measure_enabled_by_rc DEFAULT: { PROMPT_I: '> ', PROMPT_S: '> ', - PROMPT_C: '> ', - PROMPT_N: '> ' + PROMPT_C: '> ' } }, PROMPT_MODE: :DEFAULT, @@ -317,8 +314,7 @@ def test_measure_enabled_by_rc_with_custom DEFAULT: { PROMPT_I: '> ', PROMPT_S: '> ', - PROMPT_C: '> ', - PROMPT_N: '> ' + PROMPT_C: '> ' } }, PROMPT_MODE: :DEFAULT, @@ -348,8 +344,7 @@ def test_measure_with_custom DEFAULT: { PROMPT_I: '> ', PROMPT_S: '> ', - PROMPT_C: '> ', - PROMPT_N: '> ' + PROMPT_C: '> ' } }, PROMPT_MODE: :DEFAULT, @@ -375,8 +370,7 @@ def test_measure_with_proc DEFAULT: { PROMPT_I: '> ', PROMPT_S: '> ', - PROMPT_C: '> ', - PROMPT_N: '> ' + PROMPT_C: '> ' } }, PROMPT_MODE: :DEFAULT, diff --git a/test/irb/test_context.rb b/test/irb/test_context.rb index 5847df172..29c67392f 100644 --- a/test/irb/test_context.rb +++ b/test/irb/test_context.rb @@ -454,7 +454,6 @@ def main.inspect def test_default_return_format IRB.conf[:PROMPT][:MY_PROMPT] = { :PROMPT_I => "%03n> ", - :PROMPT_N => "%03n> ", :PROMPT_S => "%03n> ", :PROMPT_C => "%03n> " # without :RETURN diff --git a/test/irb/yamatanooroti/test_rendering.rb b/test/irb/yamatanooroti/test_rendering.rb index 6da7fded2..c094111fb 100644 --- a/test/irb/yamatanooroti/test_rendering.rb +++ b/test/irb/yamatanooroti/test_rendering.rb @@ -179,7 +179,6 @@ def test_autocomplete_with_showdoc_in_gaps_on_narrow_screen_right write_irbrc <<~'LINES' IRB.conf[:PROMPT][:MY_PROMPT] = { :PROMPT_I => "%03n> ", - :PROMPT_N => "%03n> ", :PROMPT_S => "%03n> ", :PROMPT_C => "%03n> " } @@ -214,7 +213,6 @@ def test_autocomplete_with_showdoc_in_gaps_on_narrow_screen_left write_irbrc <<~'LINES' IRB.conf[:PROMPT][:MY_PROMPT] = { :PROMPT_I => "%03n> ", - :PROMPT_N => "%03n> ", :PROMPT_S => "%03n> ", :PROMPT_C => "%03n> " }