Sha256: 6d9bcd585264a0e639f186c9ff1525e7632c9b711033c6553499f33923f727c7
Contents?: true
Size: 1.04 KB
Versions: 1
Compression:
Stored size: 1.04 KB
Contents
$:.unshift(File.dirname(__FILE__)) unless $:.include?(File.dirname(__FILE__)) require 'yaml' require 'lightning/bolt' require 'lightning/bolts' require 'lightning/completion' require 'lightning/config' require 'lightning/completion_map' require 'lightning/core_extensions' require 'lightning/generator' class Lightning TEST_FLAG = '-test' extend Config class<<self attr_accessor :current_command def complete(command, text_to_complete) load_config @current_command = command if bolt_key = config_command(command)['bolt_key'] Completion.complete(text_to_complete, bolt_key) else ["Error: No paths found for this command.", "If this is a bug contact me."] end end def translate(command, argv) load_config @current_command = command if bolt_key = config_command(command)['bolt_key'] bolts[bolt_key].resolve_completion(argv) else 'Error-no_paths_found_for_this_command' end end def bolts @bolts ||= Bolts.new end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
cldwalker-lightning-0.2.0 | lib/lightning.rb |