Skip to main content
Module

x/yargs/lib/completion-templates.ts>completionZshTemplate

yargs the modern, pirate-themed successor to optimist.
Go to Latest
variable completionZshTemplate
import { completionZshTemplate } from "https://deno.land/x/yargs@v17.5.1-deno/lib/completion-templates.ts";

type

`#compdef {{app_name}} ###-begin-{{app_name}}-completions-### # # yargs command completion script # # Installation: {{app_path}} {{completion_command}} >> ~/.zshrc # or {{app_path}} {{completion_command}} >> ~/.zprofile on OSX. # _{{app_name}}_yargs_completions() { local reply local si=$IFS IFS=$'\n' reply=($(COMP_CWORD="$((CURRENT-1))" COMP_LINE="$BUFFER" COMP_POINT="$CURSOR" {{app_path}} --get-yargs-completions "\${words[@]}")) IFS=$si _describe 'values' reply } compdef _{{app_name}}_yargs_completions {{app_name}} ###-end-{{app_name}}-completions-### `