class Bashly::Libraries::CompletionsYAML

def files

def files
  [
    {
      path:    target_path,
      content: command.completion_data.to_yaml,
    },
  ]
end

def post_install_message

def post_install_message
  <<~MESSAGE
    This file can be converted to a completions script using the g`completely` gem.
  MESSAGE
end

def target_path

def target_path
  @target_path ||= args[0] || "#{Settings.target_dir}/completions.yml"
end