https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112013-01-10T22:07:11ZRuby Issue Tracking SystemRuby master - Bug #7642: IRB indentation is gonehttps://redmine.ruby-lang.org/issues/7642?journal_id=353192013-01-10T22:07:11Zzzak (zzak _)
<ul></ul><p>Here is another reproduction on 1.9.3-p327:<br>
<a href="http://showterm.io/a12fb0188114e63df2e12" class="external">http://showterm.io/a12fb0188114e63df2e12</a></p> Ruby master - Bug #7642: IRB indentation is gonehttps://redmine.ruby-lang.org/issues/7642?journal_id=353202013-01-10T22:09:26Zzzak (zzak _)
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Assigned</i></li></ul> Ruby master - Bug #7642: IRB indentation is gonehttps://redmine.ruby-lang.org/issues/7642?journal_id=353232013-01-10T22:53:45Zkeiju (Keiju Ishitsuka)keiju@ishitsuka.com
<ul></ul><p>zzak (Zachary Scott) wrote:</p>
<blockquote>
<p>Here is another reproduction on 1.9.3-p327:<br>
<a href="http://showterm.io/a12fb0188114e63df2e12" class="external">http://showterm.io/a12fb0188114e63df2e12</a></p>
</blockquote>
<p>IRB default behavior is no auto-indent.<br>
So, this is the correct behavior.</p> Ruby master - Bug #7642: IRB indentation is gonehttps://redmine.ruby-lang.org/issues/7642?journal_id=353262013-01-10T23:08:16Zzzak (zzak _)
<ul></ul><p>Thank you Keiju-san.</p>
<p>How do you enable auto-indent?</p> Ruby master - Bug #7642: IRB indentation is gonehttps://redmine.ruby-lang.org/issues/7642?journal_id=353282013-01-10T23:27:54Zkeiju (Keiju Ishitsuka)keiju@ishitsuka.com
<ul></ul><p>zzak (Zachary Scott) wrote:</p>
<blockquote>
<p>Thank you Keiju-san.</p>
<p>How do you enable auto-indent?</p>
</blockquote>
<p>For example, .irbrc:</p>
<p>IRB.conf[:PROMPT][:AUTO_INDENT] = {<br>
:PROMPT_I => "%N(%m):%03n:%i> ",<br>
:PROMPT_N => "%N(%m):%03n:%i> ",<br>
:PROMPT_S => "%N(%m):%03n:%i%l ",<br>
:PROMPT_C => "%N(%m):%03n:%i* ",<br>
:RETURN => "=> %s\n",<br>
:AUTO_INDENT => true<br>
}</p>
<p>and, you do:</p>
<p>% irb --prompt auto-indent</p> Ruby master - Bug #7642: IRB indentation is gonehttps://redmine.ruby-lang.org/issues/7642?journal_id=353332013-01-10T23:55:26Zzzak (zzak _)
<ul></ul><p>Keiju-san, thank you for the explanation.</p>
<p>I also found this method:</p>
<p>irb_context.auto_indent_mode = true</p>
<p>What do you think about enable this by default?</p>
<p>I can open a feature request.</p> Ruby master - Bug #7642: IRB indentation is gonehttps://redmine.ruby-lang.org/issues/7642?journal_id=353602013-01-11T23:17:25Zkeiju (Keiju Ishitsuka)keiju@ishitsuka.com
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Rejected</i></li></ul><p>zzak (Zachary Scott) wrote:</p>
<blockquote>
<p>I also found this method:<br>
irb_context.auto_indent_mode = true</p>
</blockquote>
<p>Yes. other way:</p>
<p>IRB.conf[:AUTO_INDENT] = true</p>
<blockquote>
<p>What do you think about enable this by default?</p>
</blockquote>
<p>Shell(bash, zsh) is also not default.<br>
I do not think this feature is easy to use.<br>
So, people who want to use this feature may be set it.</p>