class HammerCLI::Bash::PrebuildCompletionCommand
Public Instance Methods
execute()
click to toggle source
# File lib/hammer_cli/bash/prebuild_command.rb, line 4 def execute map = HammerCLI::MainCommand.completion_map cache_file = File.expand_path( HammerCLI::Settings.get(:completion_cache_file) ) cache_dir = File.dirname(cache_file) FileUtils.mkdir_p(cache_dir) unless File.directory?(cache_dir) File.write(cache_file, map.to_json) HammerCLI::EX_OK end