Documentation ¶
Index ¶
- Constants
- func FileHandler(filter func(info os.FileInfo) bool) serpent.CompletionHandlerFunc
- func InstallShellCompletion(shell Shell) error
- func ShellOptions(choice *string) *serpent.Enum
- type Shell
- func Bash(goos string, programName string) Shell
- func DetectUserShell(programName string) (Shell, error)
- func Fish(goos string, programName string) Shell
- func Powershell(goos string, programName string) Shell
- func ShellByName(shell, programName string) (Shell, error)
- func Zsh(goos string, programName string) Shell
Constants ¶
View Source
const ( ShellBash string = "bash" ShellFish string = "fish" ShellZsh string = "zsh" ShellPowershell string = "powershell" )
Variables ¶
This section is empty.
Functions ¶
func FileHandler ¶
func FileHandler(filter func(info os.FileInfo) bool) serpent.CompletionHandlerFunc
FileHandler returns a handler that completes file names, using the given filter func, which may be nil.
func InstallShellCompletion ¶
func ShellOptions ¶
Types ¶
type Shell ¶
type Shell interface { Name() string InstallPath() (string, error) WriteCompletion(io.Writer) error ProgramName() string }
func DetectUserShell ¶
func Powershell ¶
func ShellByName ¶
Click to show internal directories.
Click to hide internal directories.