Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrCommandNotSimple = errors.New("")
Functions ¶
func BashRemoveCompletions ¶
func ParseSimpleCommand ¶
Types ¶
type Bash ¶
type Bash struct {
// contains filtered or unexported fields
}
func (*Bash) GenerateCompletions ¶
func (b *Bash) GenerateCompletions(executablePath string, _ []datastore.Completion) (lines []string)
func (*Bash) GetPreamble ¶
func (*Bash) ResetCommand ¶
type Fish ¶
type Fish struct {
// contains filtered or unexported fields
}
func (*Fish) GenerateCompletions ¶
func (f *Fish) GenerateCompletions(executablePath string, _ []datastore.Completion) (shellScript []string)
func (*Fish) GetPreamble ¶
func (*Fish) ResetCommand ¶
type ShellScriptGenerator ¶
type ShellScriptGenerator interface {
GetPreamble() []string
GenerateCompletions(executableName string, completions []datastore.Completion) []string
ResetCommand(executablePath string) []string
}
func NewShellScriptGenerator ¶
func NewShellScriptGenerator(shell string, codBinary string) (ShellScriptGenerator, error)
type Token ¶
type Token struct {
Decoded string
Original string
// Position of the token in the original string
OrigBegin int
OrigEnd int
// Indicator of reserved word (e.g. `for`, `while`, `case` etc).
// NB. Control operators such as `&&` are not reserved word
IsReserved bool
// Indicator of broken token
IsBroken bool
// Indicator of scary token (e.g. '`').
// Commands with scary token are to complex for cod to reason about.
IsScary bool
}
type Zsh ¶
type Zsh struct {
// contains filtered or unexported fields
}
func (*Zsh) GenerateCompletions ¶
func (z *Zsh) GenerateCompletions(executablePath string, _ []datastore.Completion) (script []string)
func (*Zsh) GetPreamble ¶
func (*Zsh) ResetCommand ¶
Click to show internal directories.
Click to hide internal directories.