Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultStyleConfig ¶
func DefaultStyleConfig()
DefaultStyleConfig sets some default styles for completion.
func ResetFlagsDefaults ¶
ResetFlagsDefaults resets all flags to their default values.
Slice flags accumulate per execution (and do not reset),
so we must reset them manually.
Example:
Given cmd.Flags().StringSlice("comment", nil, "")
If you run a command with --comment "a" --comment "b" you will get
the expected [a, b] slice.
If you run a command again with no --comment flags, you will get
[a, b] again instead of an empty slice.
If you run the command again with --comment "c" --comment "d" flags,
you will get [a, b, c, d] instead of just [c, d].
func SplitArgs ¶
SplitArgs splits the line in valid words, prepares them in various ways before calling the completer with them, and also determines which parts of them should be used as prefixes, in the completions and/or in the line.
func UnescapeValue ¶
when the completer has returned us some completions, we sometimes needed to post-process them a little before passing them to our shell.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.