Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/posener/complete
/ functions
Functions
194 in github.com/posener/complete
⨍
Functions
194
◇
Types & classes
27
↓ 23 callers
Function
Files
Dirs returns a predictor that predict file or directory paths. If a non-empty pattern is given, the predicted paths will match that pattern.
predict/files.go:18
↓ 21 callers
Function
Dirs
Dirs returns a predictor that predict directory paths. If a non-empty pattern is given, the predicted paths will match that pattern.
predict/files.go:12
↓ 19 callers
Function
OptValues
OptValues allows to set a desired set of valid values for the flag.
predict/options.go:20
↓ 19 callers
Method
Predict
Predict returns prediction options for a given prefix. The prefix is what currently is typed as a hint for what to return, but the returned values can
complete.go:38
↓ 15 callers
Method
Parse
Parse parses command line arguments.
compflag/compflag.go:50
↓ 12 callers
Method
Check
Check checks that value is one of the predicted values, in case that the check field was set.
predict/options.go:68
↓ 9 callers
Function
OptCheck
OptCheck enforces the valid values on the predicted flag.
predict/options.go:35
↓ 8 callers
Function
Options
Options return a config from a list of options.
predict/options.go:51
↓ 8 callers
Function
Or
Or unions prediction functions, so that the result predication is the union of their predications.
predict/predict.go:24
↓ 8 callers
Method
String
()
flags_test.go:45
↓ 7 callers
Method
Name
()
compflag/compflag.go:60
↓ 7 callers
Method
String
String if a flag function for a flag of type string.
compflag/flags.go:54
↓ 7 callers
Function
Test
Test is a testing helper function for testing bash completion of a given completer.
testing.go:11
↓ 6 callers
Method
Duration
Duration if a flag function for a flag of type time.Duration.
compflag/flags.go:90
↓ 6 callers
Method
Int
Int if a flag function for a flag of type int.
compflag/flags.go:78
↓ 5 callers
Function
Parse
Parse parses a typed command line argument list, and returns a list of arguments.
internal/arg/arg.go:26
↓ 4 callers
Method
Complete
Complete runs the completion of the described command.
command.go:19
↓ 4 callers
Method
LastSpace
()
internal/tokener/tokener.go:65
↓ 4 callers
Method
getCompletionFilePath
(cmd string)
install/fish.go:48
↓ 3 callers
Method
Bool
Bool if a flag function for a flag of type bool.
compflag/flags.go:66
↓ 3 callers
Function
Complete
Complete the command line arguments for the given command in the case that the program was invoked with COMP_LINE and COMP_POINT environment variables
complete.go:59
↓ 3 callers
Method
Quoted
()
internal/tokener/tokener.go:49
↓ 3 callers
Function
String
String if a flag function for a flag of type string.
compflag/flags.go:14
↓ 3 callers
Method
Visit
Visit visit a byte and update the state of the quotes. It returns true if the byte was quotes or escape character.
internal/tokener/tokener.go:12
↓ 3 callers
Method
cmd
(cmd, bin string)
install/zsh.go:42
↓ 3 callers
Method
cmd
(cmd, bin string)
install/bash.go:35
↓ 3 callers
Method
complete
compete command with given before and after text. if the command has sub commands: try to complete only sub commands or help flags. Otherwise complete
complete.go:114
↓ 3 callers
Function
fixPathForm
fixPathForm changes a file name to a relative name
predict/files.go:139
↓ 3 callers
Function
getBinaryPath
()
install/install.go:162
↓ 3 callers
Function
helpFlag
helpFlag returns either "-h", "-help" or "--help".
complete.go:334
↓ 3 callers
Function
installers
()
install/install.go:113
↓ 3 callers
Method
iterateStack
(f func(Completer))
complete.go:257
↓ 3 callers
Function
lineInFile
(path string, line string)
install/utils.go:11
↓ 3 callers
Method
suggestFlag
(dashes, prefix string)
complete.go:215
↓ 3 callers
Method
suggestFlagValue
(flagName, prefix string)
complete.go:233
↓ 2 callers
Method
BoolVar
BoolVar if a flag function for a flag of already exiting variable of type bool.
compflag/flags.go:73
↓ 2 callers
Method
DurationVar
DurationVar if a flag function for a flag of already exiting variable of type time.Duration.
compflag/flags.go:97
↓ 2 callers
Method
Escaped
()
internal/tokener/tokener.go:45
↓ 2 callers
Function
FlagSet
FlagSet returns a completer for a given standard library `flag.FlagSet`. It completes flag names, and additionally completes value if the `flag.Value`
flags.go:14
↓ 2 callers
Method
IntVar
IntVar if a flag function for a flag of already exiting variable of type int.
compflag/flags.go:85
↓ 2 callers
Method
IsInstalled
(cmd, bin string)
install/fish.go:17
↓ 2 callers
Method
IsInstalled
(cmd, bin string)
install/zsh.go:14
↓ 2 callers
Method
IsInstalled
(cmd, bin string)
install/bash.go:13
↓ 2 callers
Method
StringVar
StringVar if a flag function for a flag of already exiting variable of type string.
compflag/flags.go:61
↓ 2 callers
Method
SubCmdGet
SubCmdGet should return a sub command of the current command for the given sub command name.
complete.go:20
↓ 2 callers
Method
SubCmdList
SubCmdList should return the list of all sub commands of the current command.
complete.go:18
↓ 2 callers
Method
Visit
(fn func(*flag.Flag))
compflag/compflag.go:54
↓ 2 callers
Function
appendFile
(path string, content string)
install/utils.go:19
↓ 2 callers
Function
filterByPrefix
(prefix string, options ...string)
complete.go:284
↓ 2 callers
Function
fixDirPath
(path string)
predict/files.go:169
↓ 2 callers
Function
fixDirPath
(path string)
gocomplete/pkgs.go:171
↓ 2 callers
Function
fixPathForm
fixPathForm changes a file name to a relative name
gocomplete/pkgs.go:141
↓ 2 callers
Function
funcPredict
predictTest predict test names. it searches in the current directory for all the go test files and then all the relevant function names. for test name
gocomplete/tests.go:22
↓ 2 callers
Function
hasPrefix
hasPrefix checks if s has the give prefix. It disregards quotes and escaped spaces, and return s in the form of the given prefix.
complete.go:299
↓ 2 callers
Function
main
()
gocomplete/complete.go:24
↓ 2 callers
Function
matchFile
MatchFile returns true if prefix can match the file
predict/files.go:123
↓ 2 callers
Method
predictFiles
(prefix string)
predict/files.go:47
↓ 2 callers
Function
rcFile
(name string)
install/install.go:170
↓ 2 callers
Function
removeFromFile
(path string, line string)
install/utils.go:23
↓ 2 callers
Function
suggest
(dashes, prefix string, collect func(prefix string) []string)
complete.go:263
↓ 2 callers
Method
suggestArgsValue
(prefix string)
complete.go:245
↓ 1 callers
Method
ArgsGet
ArgsGet should return predictor for positional arguments of the command line.
complete.go:29
↓ 1 callers
Method
Closed
()
internal/tokener/tokener.go:57
↓ 1 callers
Method
Complete
Complete performs bash completion if needed.
compflag/compflag.go:66
↓ 1 callers
Method
FlagGet
FlagGet should return completion options for a given flag. It is invoked with the flag name without the dash prefix. The flag is not promised to be in
complete.go:27
↓ 1 callers
Method
FlagList
FlagList should return a list of all the flag names of the current command. The flag names should not have the dash prefix.
complete.go:23
↓ 1 callers
Function
Install
Install complete command given: cmd: is the command name
install/install.go:53
↓ 1 callers
Method
Install
(cmd, bin string)
install/install.go:47
↓ 1 callers
Method
InternalTypeName
()
compflag/gen/main.go:24
↓ 1 callers
Method
IsInstalled
(cmd, bin string)
install/install.go:46
↓ 1 callers
Method
Lookup
(name string)
compflag/compflag.go:62
↓ 1 callers
Function
OptPredictor
OptPredictor allows to set a custom predictor.
predict/options.go:25
↓ 1 callers
Function
Parse
Parse parses command line arguments. It also performs bash completion when needed.
compflag/compflag.go:73
↓ 1 callers
Function
Run
(name string, uninstall, yes bool, out io.Writer, in io.Reader)
install/install.go:15
↓ 1 callers
Function
Uninstall
Uninstall complete command given: cmd: is the command name
install/install.go:93
↓ 1 callers
Method
Uninstall
(cmd, bin string)
install/install.go:48
↓ 1 callers
Method
VisitAll
(fn func(*flag.Flag))
compflag/compflag.go:55
↓ 1 callers
Method
cmd
(cmd, bin string)
install/fish.go:52
↓ 1 callers
Function
createFile
(path string, content string)
install/utils.go:15
↓ 1 callers
Function
directory
directory gives the directory of the given partial path in case that it is not, we fall back to the current directory.
predict/files.go:92
↓ 1 callers
Function
directory
(prefix string)
gocomplete/pkgs.go:129
↓ 1 callers
Function
equal
(s1, s2 []string)
gocomplete/tests_test.go:64
↓ 1 callers
Function
findGopath
()
gocomplete/pkgs.go:112
↓ 1 callers
Function
fishConfigDir
()
install/install.go:138
↓ 1 callers
Function
formatBool
(v bool)
compflag/compflag.go:98
↓ 1 callers
Function
formatDuration
(v time.Duration)
compflag/compflag.go:102
↓ 1 callers
Function
formatInt
(v int)
compflag/compflag.go:94
↓ 1 callers
Function
formatString
(v string)
compflag/compflag.go:90
↓ 1 callers
Function
funcNames
get all test names in current directory
gocomplete/tests.go:29
↓ 1 callers
Function
functionsInFile
(path string, regexp *regexp.Regexp)
gocomplete/parse.go:11
↓ 1 callers
Function
getConfigHomePath
()
install/install.go:149
↓ 1 callers
Method
listFiles
(dir string)
predict/files.go:61
↓ 1 callers
Function
listPackages
listPackages looks in current pointed dir and in all it's direct sub-packages and return a list of paths to go packages.
gocomplete/pkgs.go:45
↓ 1 callers
Function
newBoolValue
(val bool, p *bool, c predict.Config)
compflag/flags.go:147
↓ 1 callers
Function
newDurationValue
(val time.Duration, p *time.Duration, c predict.Config)
compflag/flags.go:227
↓ 1 callers
Function
newIntValue
(val int, p *int, c predict.Config)
compflag/flags.go:188
↓ 1 callers
Function
newStringValue
(val string, p *string, c predict.Config)
compflag/flags.go:108
↓ 1 callers
Function
next
next returns the first argument in the line and the rest of the line.
internal/arg/arg.go:42
↓ 1 callers
Method
parse
parse a flag from an argument. The flag can have value attached when it is given in the `-key=value` format.
internal/arg/arg.go:87
↓ 1 callers
Function
parseBool
(s string)
compflag/compflag.go:96
next →
1–100 of 194, ranked by callers