Class: Toys::Utils::CompletionEngine::Bash
- Inherits:
-
Object
- Object
- Toys::Utils::CompletionEngine::Bash
- Defined in:
- core-docs/toys/utils/completion_engine.rb
Overview
Defined in the toys-core gem
A completion engine for bash.
Instance Method Summary collapse
-
#initialize(cli) ⇒ Bash
constructor
Create a bash completion engine.
-
#run ⇒ Integer
Perform completion in the current shell environment, which must include settings for the
COMP_LINE
andCOMP_POINT
environment variables.
Constructor Details
#initialize(cli) ⇒ Bash
Create a bash completion engine.
23 24 25 |
# File 'core-docs/toys/utils/completion_engine.rb', line 23 def initialize(cli) # Source available in the toys-core gem end |
Instance Method Details
#run ⇒ Integer
Perform completion in the current shell environment, which must
include settings for the COMP_LINE
and COMP_POINT
environment
variables. Prints out completion candidates, one per line, and
returns a status code indicating the result.
- 0 for success.
- 1 if completion failed.
- 2 if the environment is incorrect (e.g. expected environment variables not found)
40 41 42 |
# File 'core-docs/toys/utils/completion_engine.rb', line 40 def run # Source available in the toys-core gem end |