Module: Reline

Extended by:
Forwardable, SingleForwardable
Defined in:
lib/reline.rb,
lib/reline/version.rb

Defined Under Namespace

Modules: KeyActor, Terminfo Classes: ANSI, Config, ConfigEncodingConversionError, Core, CursorPos, GeneralIO, History, Key, KeyStroke, KillRing, LineEditor, Unicode, Windows

Constant Summary collapse

FILENAME_COMPLETION_PROC =
nil
USERNAME_COMPLETION_PROC =
nil
IOGate =
if $stdout.isatty
  require 'reline/ansi'
  Reline::ANSI
else
  Reline::GeneralIO
end
HISTORY =
Reline::History.new(Reline.core.config)
VERSION =
'0.2.7'

Class Method Summary collapse

Class Method Details

.coreObject



436
437
438
439
440
441
442
443
444
445
446
447
448
449
# File 'lib/reline.rb', line 436

def self.core
  @core ||= Core.new { |core|
    core.config = Reline::Config.new
    core.key_stroke = Reline::KeyStroke.new(core.config)
    core.line_editor = Reline::LineEditor.new(core.config, Reline::IOGate.encoding)

    core.basic_word_break_characters = " \t\n`><=;|&{("
    core.completer_word_break_characters = " \t\n`><=;|&{("
    core.basic_quote_characters = '"\''
    core.completer_quote_characters = '"\''
    core.filename_quote_characters = ""
    core.special_prefixes = ""
  }
end

.encoding_system_needsObject



432
433
434
# File 'lib/reline.rb', line 432

def self.encoding_system_needs
  self.core.encoding
end

.insert_text(*args, &block) ⇒ Object



416
417
418
419
# File 'lib/reline.rb', line 416

def self.insert_text(*args, &block)
  line_editor.insert_text(*args, &block)
  self
end

.line_editorObject



455
456
457
# File 'lib/reline.rb', line 455

def self.line_editor
  core.line_editor
end

.ungetc(c) ⇒ Object



451
452
453
# File 'lib/reline.rb', line 451

def self.ungetc(c)
  Reline::IOGate.ungetc(c)
end