Class: Completely::Commands::Base

Inherits:
MisterBin::Command
  • Object
show all
Defined in:
lib/completely/commands/base.rb

Direct Known Subclasses

Generate, Init, Preview, Test

Class Method Summary collapse

Class Method Details

.environment_config_pathObject



19
20
21
22
# File 'lib/completely/commands/base.rb', line 19

def environment_config_path
  environment 'COMPLETELY_CONFIG_PATH',
    'Path to a completely configuration file [default: completely.yaml].'
end

.environment_debugObject



24
25
26
27
28
# File 'lib/completely/commands/base.rb', line 24

def environment_debug
  environment 'COMPLETELY_DEBUG', 'If not empty, the generated script will include ' \
    'an additional debugging snippet that outputs the compline and current word to ' \
    'a text file when a completion is requested.'
end

.option_functionObject



14
15
16
17
# File 'lib/completely/commands/base.rb', line 14

def option_function
  option '-f --function NAME',
    'Modify the name of the function in the generated script.'
end

.param_config_pathObject



7
8
9
10
11
12
# File 'lib/completely/commands/base.rb', line 7

def param_config_path
  param 'CONFIG_PATH', <<~USAGE
    Path to the YAML configuration file [default: completely.yaml].
    Can also be set by an environment variable.
  USAGE
end