Method: Pry::Editor#blocking_flag_for_editor

Defined in:
lib/pry/editor.rb

#blocking_flag_for_editor(blocking) ⇒ Object (private)

Some editors that run outside the terminal allow you to control whether or not to block the process from which they were launched (in this case, Pry). For those editors, return the flag that produces the desired behavior.



100
101
102
103
104
105
106
107
108
109
110
111
# File 'lib/pry/editor.rb', line 100

def blocking_flag_for_editor(blocking)
  case editor_name
  when /^emacsclient/
    '--no-wait' unless blocking
  when /^[gm]vim/
    '--nofork' if blocking
  when /^jedit/
    '-wait' if blocking
  when /^mate/, /^subl/, /^redcar/, /^code/
    '-w' if blocking
  end
end