Sha256: 6ee2d593a0b01e45642abb3ed5c97c141188be98216bbcb088238114cf408272
Contents?: true
Size: 1.05 KB
Versions: 14
Compression:
Stored size: 1.05 KB
Contents
module PowerStencil module Utils module Completion include PowerStencil::Utils::DirectoryProcessor def generate_zsh_completion(script_name) # Dirty hack config.executable_gem_layer[:file_renaming_patterns] = {'(.+)_power_stencil.sh.erb' => '\1_power_stencil' } target_dir = File.expand_path config[:completion_target][:zsh][:completion_dir] source_dir = File.join PowerStencil::Project::Paths.system_templates_templates_path, 'zsh_command_line_completion' engine = PowerStencil::Engine::InitEngine.new engine.dsl = PowerStencil::Dsl::Completion engine.dsl.script_name = script_name engine.render_source source_dir, target_dir, overwrite_files: true puts_and_logs "zsh auto_completion has been installed in '#{File.join target_dir, "_#{script_name}"}'.", check_verbose: false puts "You should ensure you have something like 'fpath=(#{target_dir} $fpath)' in your ~/.zshrc file..." puts 'You may have to relog for changes to be applied.' end end end end
Version data entries
14 entries across 14 versions & 1 rubygems