Sha256: 54054b357b12baaa85c0d62cb67b1665ff49183abeafc404f52c6a2e2b8e94cb

Contents?: true

Size: 708 Bytes

Versions: 17

Compression:

Stored size: 708 Bytes

Contents

# frozen_string_literal: true

module Takeltau
  # tau completion
  class Completion < SubCommandBase
    include LoggingModule

    desc 'bash', 'Print bash completion code'
    long_desc <<-LONGDESC.gsub("\n", "\x5")
    Print bash completion code
    This command will print bash code which can be parsed to enable auto-completion for the takelage cli.
    Add this to your bash startup files:

    source <(tau completion bash)
    LONGDESC
    # Print bash completion code.
    def bash
      completion_bash = Takeltau::CLI.new.bash_fylla
      exit false if completion_bash == false
      say completion_bash.strip.split("\n").grep_v(/"--help"/).grep_v(/"-h"/).join("\n")
      true
    end
  end
end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
takeltau-0.46.9 lib/takeltau/completion/cli.rb
takeltau-0.46.8 lib/takeltau/completion/cli.rb
takeltau-0.46.5 lib/takeltau/completion/cli.rb
takeltau-0.46.1 lib/takeltau/completion/cli.rb
takeltau-0.46.0 lib/takeltau/completion/cli.rb
takeltau-0.45.27 lib/takeltau/completion/cli.rb
takeltau-0.45.26 lib/takeltau/completion/cli.rb
takeltau-0.45.24 lib/takeltau/completion/cli.rb
takeltau-0.45.23 lib/takeltau/completion/cli.rb
takeltau-0.45.22 lib/takeltau/completion/cli.rb
takeltau-0.45.21 lib/takeltau/completion/cli.rb
takeltau-0.45.19 lib/takeltau/completion/cli.rb
takeltau-0.45.17 lib/takeltau/completion/cli.rb
takeltau-0.45.16 lib/takeltau/completion/cli.rb
takeltau-0.45.14 lib/takeltau/completion/cli.rb
takeltau-0.45.13 lib/takeltau/completion/cli.rb
takeltau-0.45.12 lib/takeltau/completion/cli.rb