module MiniReadline

The MiniReadline main module.

Options selection, control, and access

The ReadLine class that does the actual work.

The line editor.

Process :auto_complete

An array as the source for auto-complete.

The data source for mysh file name auto-complete.

The controller for auto-complete.

The data source for auto-complete.

The data source for auto-complete.

Process :cancel

Process :delete_left

Process :delete_all_right

Process :delete_left

Process :delete_right

Edit window support.

Keep the cursor in sync.

Keeping the screen in sync.

Process :end_of_input

Process :enter

Process :go_end

Process :go_home

Process :go_left

Process :go_right

Process :insert_text

Process :next_history

Process :previous_history

Process :unmapped

Process :word_left

Process :word_right

Edit history support

Support for the edit without history.

Support for the specialized prompt string class.

Version info for the gem.

Constants

BASE_OPTIONS

The base options shared by all instances.

DESCRIPTION

A brief description.

VERSION

The current version of the mini_readline gem.

Public Class Methods

readline(prompt = "", history = nil, options = {}) click to toggle source

The (limited) compatibility module function.

# File lib/mini_readline.rb, line 18
def self.readline(prompt = "", history = nil, options = {})
  get_reader.readline(options.merge({prompt: prompt, history: history}))
end

Private Class Methods

get_reader() click to toggle source

Get the shared instance of Readline.

# File lib/mini_readline.rb, line 25
def self.get_reader
  @reader ||= Readline.new()
end