Documentation ¶
Overview ¶
Package bash provides bash completion
Index ¶
Constants ¶
View Source
const ( COMP_TYPE_NORMAL = "9" // TAB, for normal completion COMP_TYPE_LIST_PARTIAL_WORD = "33" // ‘!’, for listing alternatives on partial word completion, COMP_TYPE_MENU_COMPLETION = "37" // ‘%’, for menu completion COMP_TYPE_LIST_SUCCESSIVE_TABS = "63" // ‘?’, for listing completions after successive tabs, COMP_TYPE_LIST_NOT_UNMODIFIED = "64" // ‘@’, to list completions if the word is not unmodified )
Variables ¶
This section is empty.
Functions ¶
func ActionRawValues ¶
ActionRawValues formats values for bash.
func Patch ¶
Patch patches args if `COMP_LINE` environment variable is set.
Bash passes redirects to the completion function so these need to be filtered out.
`example action >/tmp/stdout.txt --values 2>/tmp/stderr.txt fi[TAB]` ["example", "action", ">", "/tmp/stdout.txt", "--values", "2", ">", "/tmp/stderr.txt", "fi"] ["example", "action", "--values", "fi"]
Types ¶
type RedirectError ¶
type RedirectError struct{}
RedirectError current position is a redirect like `echo test >[TAB]`.
func (RedirectError) Error ¶
func (r RedirectError) Error() string
Click to show internal directories.
Click to hide internal directories.