Class: Indoctrinatr::Tools::Commands::ZshCompletions

Inherits:
Dry::CLI::Command
  • Object
show all
Defined in:
lib/indoctrinatr/tools/commands/zsh_completions.rb

Instance Method Summary collapse

Instance Method Details

#callObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/indoctrinatr/tools/commands/zsh_completions.rb', line 7

def call(**)
  puts "    Add this to your .zshrc (and open up a new shell):\n\n    if [[ -n ${ZSH_VERSION-} ]]; then\n      autoload -U +X bashcompinit && bashcompinit\n    fi\n    complete -F get_indoctrinatr_commands indoctrinatr\n    function get_indoctrinatr_commands()\n    {\n      local binary=\"indoctrinatr\"\n      COMPREPLY=(`$binary completions`)\n    }\n  HEREDOC\nend\n"