diff options
author | aycabta <[email protected]> | 2021-09-27 03:21:39 +0900 |
---|---|---|
committer | git <[email protected]> | 2021-09-27 03:23:48 +0900 |
commit | 00cfafc0f5424e31dbf0a13b5bd6345572260f13 (patch) | |
tree | 6c3e66e33b2d952ee2807f9edce812343830945f /lib/irb | |
parent | 51773bed10eb9d8f4d38e1a1e9d9d04d4954380d (diff) |
[ruby/irb] Add doc about "echo on assignment"
https://github.com/ruby/irb/commit/5af637b3c1
Diffstat (limited to 'lib/irb')
-rw-r--r-- | lib/irb/context.rb | 12 | ||||
-rw-r--r-- | lib/irb/lc/help-message | 6 |
2 files changed, 18 insertions, 0 deletions
diff --git a/lib/irb/context.rb b/lib/irb/context.rb index 6dc5d7f0fd..09fd840bd3 100644 --- a/lib/irb/context.rb +++ b/lib/irb/context.rb @@ -274,6 +274,18 @@ module IRB # IRB.CurrentContext.echo_on_assignment = true # a = "omg" * 10 # #=> 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 # Whether a newline is put before multiline output. # diff --git a/lib/irb/lc/help-message b/lib/irb/lc/help-message index fe9e3246d9..cee860fdeb 100644 --- a/lib/irb/lc/help-message +++ b/lib/irb/lc/help-message @@ -22,6 +22,12 @@ Usage: irb.rb [options] [programfile] [arguments] when new workspace was created --echo Show result (default) --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 --noinspect Don't use inspect for output --multiline Use multiline editor module |