class Bashly::Libraries::CompletionsScript

def files

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

def post_install_message

def post_install_message
  <<~MESSAGE
    In order to enable completions, run:
      m`$ source #{target_path}`
  MESSAGE
end

def target_path

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