Sha256: 56737c775e980f74d5b7d5d1343adc46ea7863cb0ee138780a9750561b8b672a
Contents?: true
Size: 835 Bytes
Versions: 22
Compression:
Stored size: 835 Bytes
Contents
# frozen_string_literal: true # tau ship completion bash module ShipCompletionBash # Print bash completion code def ship_completion_bash tau_completion = Takeltau::CLI.new.bash_fylla completion = _ship_completion_bash_remove_lines tau_completion completion = _ship_completion_bash_remove_functions completion completion << 'complete -F _ship ship' completion end private # Remove bash completion lines def _ship_completion_bash_remove_lines(tau_completion) completion = tau_completion .strip.split("\n") completion.pop completion.join("\n") end # Remove bash completion functions def _ship_completion_bash_remove_functions(completion) functions = completion .split(/_tau[^_]*/) .grep(/_ship/) .grep_v(/_ship\n/) functions.join end end
Version data entries
22 entries across 22 versions & 1 rubygems
Version | Path |
---|---|
takeltau-0.44.19 | lib/takeltau/ship/completion/bash.rb |
takeltau-0.44.18 | lib/takeltau/ship/completion/bash.rb |