{"modulePath":"github.com/coder/serpent","version":"v0.15.0","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package completion\n\n## Constants\n\n```go\nconst (\n\tShellBash       string = \"bash\"\n\tShellFish       string = \"fish\"\n\tShellZsh        string = \"zsh\"\n\tShellPowershell string = \"powershell\"\n)\n```\n\n## Functions\n\n```go\nfunc FileHandler(filter func(info os.FileInfo) bool) serpent.CompletionHandlerFunc\n```\nFileHandler returns a handler that completes file names, using the given filter func, which may be nil.\n\n```go\nfunc InstallShellCompletion(shell Shell) error\n```\n\n```go\nfunc ShellOptions(choice *string) *serpent.Enum\n```\n\n## Types\n\n```go\ntype Shell interface {\n\tName() string\n\tInstallPath() (string, error)\n\tWriteCompletion(io.Writer) error\n\tProgramName() string\n}\n```\n\n```go\nfunc Bash(goos string, programName string) Shell\n```\n\n```go\nfunc DetectUserShell(programName string) (Shell, error)\n```\n\n```go\nfunc Fish(goos string, programName string) Shell\n```\n\n```go\nfunc Powershell(goos string, programName string) Shell\n```\n\n```go\nfunc ShellByName(shell, programName string) (Shell, error)\n```\n\n```go\nfunc Zsh(goos string, programName string) Shell\n```\n\n","path":"github.com/coder/serpent/completion","name":"completion","synopsis":"","isRedistributable":true}
