Sha256: a544b41b68594e7d4149964e32322fb09bbd28fdafa743588b53c38d3766c13c
Contents?: true
Size: 657 Bytes
Versions: 8
Compression:
Stored size: 657 Bytes
Contents
module HammerCLI module Bash class PrebuildCompletionCommand < HammerCLI::AbstractCommand def execute map = HammerCLI::MainCommand.completion_map cache_file = HammerCLI::Settings.get(:completion_cache_file) cache_dir = File.dirname(cache_file) FileUtils.mkdir_p(cache_dir) unless File.directory?(cache_dir) File.write(File.expand_path(cache_file), map.to_json) HammerCLI::EX_OK end end end HammerCLI::MainCommand.subcommand( 'prebuild-bash-completion', _('Prepare map of options and subcommands for Bash completion'), HammerCLI::Bash::PrebuildCompletionCommand ) end
Version data entries
8 entries across 8 versions & 1 rubygems