Skip to content

Commit e10fcee

Browse files
authored
Display mod key as Option on Darwin platforms (#584)
Check RUBY_PLATFORM for `darwin` and modify the mod key from `Alt` to `Option`.
1 parent 849087b commit e10fcee

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/irb/input-method.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,8 @@ def auto_indent(&block)
398398
formatter = RDoc::Markup::ToAnsi.new
399399
formatter.width = width
400400
dialog.trap_key = alt_d
401-
message = 'Press Alt+d to read the full document'
401+
mod_key = RUBY_PLATFORM.match?(/darwin/) ? "Option" : "Alt"
402+
message = "Press #{mod_key}+d to read the full document"
402403
contents = [message] + doc.accept(formatter).split("\n")
403404

404405
y = cursor_pos_to_render.y

0 commit comments

Comments
 (0)