Documentation ¶
Overview ¶
Package cobra contains shell scripts and constants copied from https://github.com/spf13/cobra for use in our own shell tab-completion logic.
Index ¶
- Constants
- func ScriptBash(w io.Writer, name, compCmd, nameForVar string) error
- func ScriptFish(w io.Writer, name, compCmd, nameForVar string) error
- func ScriptPowershell(w io.Writer, name, compCmd, nameForVar string) error
- func ScriptZsh(w io.Writer, name, compCmd, nameForVar string) error
- type ShellCompDirective
Constants ¶
View Source
const UsageTemplate = `` /* 1233-byte string literal not displayed */
Variables ¶
This section is empty.
Functions ¶
Types ¶
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. 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. ShellCompDirectiveFilterDirs // ShellCompDirectiveKeepOrder indicates that the shell should preserve the order // in which the completions are provided ShellCompDirectiveKeepOrder // 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 )
func (ShellCompDirective) String ¶
func (d ShellCompDirective) String() string
Returns a string listing the different directive enabled in the specified parameter
Click to show internal directories.
Click to hide internal directories.