mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
parent
51773bed10
commit
00cfafc0f5
5 changed files with 40 additions and 0 deletions
|
@ -51,6 +51,12 @@ irbの使い方は, Rubyさえ知っていればいたって簡単です. 基本
|
||||||
オブジェクトの作成方法を 0 から 3 のいずれかに設定する.
|
オブジェクトの作成方法を 0 から 3 のいずれかに設定する.
|
||||||
--echo 実行結果を表示する(デフォルト).
|
--echo 実行結果を表示する(デフォルト).
|
||||||
--noecho 実行結果を表示しない.
|
--noecho 実行結果を表示しない.
|
||||||
|
--echo-on-assignment
|
||||||
|
代入時に実行結果を表示する.
|
||||||
|
--noecho-on-assignment
|
||||||
|
代入時に実行結果を表示しない.
|
||||||
|
--truncate-echo-on-assignment
|
||||||
|
代入時に省略された実行結果を表示する(デフォルト).
|
||||||
--inspect 結果出力にinspectを用いる.
|
--inspect 結果出力にinspectを用いる.
|
||||||
--noinspect 結果出力にinspectを用いない.
|
--noinspect 結果出力にinspectを用いない.
|
||||||
--singleline シングルラインエディタを利用する.
|
--singleline シングルラインエディタを利用する.
|
||||||
|
|
|
@ -64,6 +64,12 @@ require_relative "irb/easter-egg"
|
||||||
# when new workspace was created
|
# when new workspace was created
|
||||||
# --echo Show result (default)
|
# --echo Show result (default)
|
||||||
# --noecho Don't show result
|
# --noecho Don't show result
|
||||||
|
# --echo-on-assignment
|
||||||
|
# Show result on assignment
|
||||||
|
# --noecho-on-assignment
|
||||||
|
# Don't show result on assignment
|
||||||
|
# --truncate-echo-on-assignment
|
||||||
|
# Show truncated result on assignment (default)
|
||||||
# --inspect Use `inspect' for output
|
# --inspect Use `inspect' for output
|
||||||
# --noinspect Don't use inspect for output
|
# --noinspect Don't use inspect for output
|
||||||
# --multiline Use multiline editor module
|
# --multiline Use multiline editor module
|
||||||
|
|
|
@ -274,6 +274,18 @@ module IRB
|
||||||
# IRB.CurrentContext.echo_on_assignment = true
|
# IRB.CurrentContext.echo_on_assignment = true
|
||||||
# a = "omg" * 10
|
# a = "omg" * 10
|
||||||
# #=> omgomgomgomgomgomgomgomgomgomg
|
# #=> omgomgomgomgomgomgomgomgomgomg
|
||||||
|
#
|
||||||
|
# To set the behaviour of showing on assignment in irb:
|
||||||
|
#
|
||||||
|
# IRB.conf[:ECHO_ON_ASSIGNMENT] = :truncate or true or false
|
||||||
|
#
|
||||||
|
# or
|
||||||
|
#
|
||||||
|
# irb_context.echo_on_assignment = :truncate or true or false
|
||||||
|
#
|
||||||
|
# or
|
||||||
|
#
|
||||||
|
# IRB.CurrentContext.echo_on_assignment = :truncate or true or false
|
||||||
attr_accessor :echo_on_assignment
|
attr_accessor :echo_on_assignment
|
||||||
# Whether a newline is put before multiline output.
|
# Whether a newline is put before multiline output.
|
||||||
#
|
#
|
||||||
|
|
|
@ -22,6 +22,12 @@ Usage: irb.rb [options] [programfile] [arguments]
|
||||||
when new workspace was created
|
when new workspace was created
|
||||||
--echo Show result (default)
|
--echo Show result (default)
|
||||||
--noecho Don't show result
|
--noecho Don't show result
|
||||||
|
--echo-on-assignment
|
||||||
|
Show result on assignment
|
||||||
|
--noecho-on-assignment
|
||||||
|
Don't show result on assignment
|
||||||
|
--truncate-echo-on-assignment
|
||||||
|
Show truncated result on assignment (default)
|
||||||
--inspect Use `inspect' for output
|
--inspect Use `inspect' for output
|
||||||
--noinspect Don't use inspect for output
|
--noinspect Don't use inspect for output
|
||||||
--multiline Use multiline editor module
|
--multiline Use multiline editor module
|
||||||
|
|
10
man/irb.1
10
man/irb.1
|
@ -112,6 +112,16 @@ Show result (default).
|
||||||
Don't show result.
|
Don't show result.
|
||||||
.Pp
|
.Pp
|
||||||
.Pp
|
.Pp
|
||||||
|
.It Fl -echo-on-assignment
|
||||||
|
Show result on assignment.
|
||||||
|
.Pp
|
||||||
|
.It Fl -noecho-on-assignment
|
||||||
|
Don't show result on assignment.
|
||||||
|
.Pp
|
||||||
|
.It Fl -truncate-echo-on-assignment
|
||||||
|
Show truncated result on assignment (default).
|
||||||
|
.Pp
|
||||||
|
.Pp
|
||||||
.It Fl -colorize
|
.It Fl -colorize
|
||||||
Use colorization.
|
Use colorization.
|
||||||
.Pp
|
.Pp
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue