File tree 5 files changed +40
-0
lines changed
5 files changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,12 @@ irbの使い方は, Rubyさえ知っていればいたって簡単です. 基本
51
51
オブジェクトの作成方法を 0 から 3 のいずれかに設定する.
52
52
--echo 実行結果を表示する(デフォルト).
53
53
--noecho 実行結果を表示しない.
54
+ --echo-on-assignment
55
+ 代入時に実行結果を表示する.
56
+ --noecho-on-assignment
57
+ 代入時に実行結果を表示しない.
58
+ --truncate-echo-on-assignment
59
+ 代入時に省略された実行結果を表示する(デフォルト).
54
60
--inspect 結果出力にinspectを用いる.
55
61
--noinspect 結果出力にinspectを用いない.
56
62
--singleline シングルラインエディタを利用する.
Original file line number Diff line number Diff line change 64
64
# when new workspace was created
65
65
# --echo Show result (default)
66
66
# --noecho Don't show result
67
+ # --echo-on-assignment
68
+ # Show result on assignment
69
+ # --noecho-on-assignment
70
+ # Don't show result on assignment
71
+ # --truncate-echo-on-assignment
72
+ # Show truncated result on assignment (default)
67
73
# --inspect Use `inspect' for output
68
74
# --noinspect Don't use inspect for output
69
75
# --multiline Use multiline editor module
Original file line number Diff line number Diff line change @@ -274,6 +274,18 @@ def main
274
274
# IRB.CurrentContext.echo_on_assignment = true
275
275
# a = "omg" * 10
276
276
# #=> omgomgomgomgomgomgomgomgomgomg
277
+ #
278
+ # To set the behaviour of showing on assignment in irb:
279
+ #
280
+ # IRB.conf[:ECHO_ON_ASSIGNMENT] = :truncate or true or false
281
+ #
282
+ # or
283
+ #
284
+ # irb_context.echo_on_assignment = :truncate or true or false
285
+ #
286
+ # or
287
+ #
288
+ # IRB.CurrentContext.echo_on_assignment = :truncate or true or false
277
289
attr_accessor :echo_on_assignment
278
290
# Whether a newline is put before multiline output.
279
291
#
Original file line number Diff line number Diff line change @@ -22,6 +22,12 @@ Usage: irb.rb [options] [programfile] [arguments]
22
22
when new workspace was created
23
23
--echo Show result (default)
24
24
--noecho Don't show result
25
+ --echo-on-assignment
26
+ Show result on assignment
27
+ --noecho-on-assignment
28
+ Don't show result on assignment
29
+ --truncate-echo-on-assignment
30
+ Show truncated result on assignment (default)
25
31
--inspect Use `inspect' for output
26
32
--noinspect Don't use inspect for output
27
33
--multiline Use multiline editor module
Original file line number Diff line number Diff line change @@ -112,6 +112,16 @@ Show result (default).
112
112
Don't show result.
113
113
.Pp
114
114
.Pp
115
+ .It Fl -echo-on-assignment
116
+ Show result on assignment.
117
+ .Pp
118
+ .It Fl -noecho-on-assignment
119
+ Don't show result on assignment.
120
+ .Pp
121
+ .It Fl -truncate-echo-on-assignment
122
+ Show truncated result on assignment (default).
123
+ .Pp
124
+ .Pp
115
125
.It Fl -colorize
116
126
Use colorization.
117
127
.Pp
You can’t perform that action at this time.
0 commit comments