Documentation ¶
Index ¶
Constants ¶
View Source
const ( // ShellCompNoDescRequestCmd is the name of the hidden command that is used to request // completion results without their description. It is used by the shell completion scripts. ShellCompNoDescRequestCmd = "completion completeNoDesc" BashCompFilenameExt = "kong_annotation_bash_completion_filename_extensions" BashCompCustom = "kong_annotation_bash_completion_custom" BashCompOneRequiredFlag = "kong_annotation_bash_completion_one_required_flag" BashCompSubdirsInDir = "kong_annotation_bash_completion_subdirs_in_dir" )
Annotations for Bash completion.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Completion ¶
type Completion struct { Bash Bash `cmd:"" help:"Generate the autocompletion script for bash"` Zsh Zsh `cmd:"" help:"Generate the autocompletion script for zsh"` Fish Fish `cmd:"" help:"Generate the autocompletion script for fish"` }
Completion command.
type ShellCompDirective ¶
type ShellCompDirective int
ShellCompDirective is a bit map representing the different behaviors the shell can be instructed to have once completions have been provided.
const ( // ShellCompDirectiveError indicates an error occurred and completions should be ignored. ShellCompDirectiveError ShellCompDirective = 1 << iota // ShellCompDirectiveNoSpace indicates that the shell should not add a space // after the completion even if there is a single completion provided. ShellCompDirectiveNoSpace // ShellCompDirectiveNoFileComp indicates that the shell should not provide // file completion even when no completion is provided. ShellCompDirectiveNoFileComp // ShellCompDirectiveFilterFileExt indicates that the provided completions // should be used as file extension filters. // For flags, using Command.MarkFlagFilename() and Command.MarkPersistentFlagFilename() // is a shortcut to using this directive explicitly. The BashCompFilenameExt // annotation can also be used to obtain the same behavior for flags. ShellCompDirectiveFilterFileExt // ShellCompDirectiveFilterDirs indicates that only directory names should // be provided in file completion. To request directory names within another // directory, the returned completions should specify the directory within // which to search. The BashCompSubdirsInDir annotation can be used to // obtain the same behavior but only for flags. ShellCompDirectiveFilterDirs // ShellCompDirectiveDefault indicates to let the shell perform its default // behavior after completions have been provided. // This one must be last to avoid messing up the iota count. ShellCompDirectiveDefault ShellCompDirective = 0 )
Click to show internal directories.
Click to hide internal directories.