Documentation ¶
Index ¶
- func ClientArg(prefix string) []prompt.Suggest
- func ClientOrSiteArg(prefix string) []prompt.Suggest
- func ClientOrSiteOrGroupArg(prefix string) []prompt.Suggest
- func DirArg(prefix string) []prompt.Suggest
- func EnumArg(prefix string, options [][2]string) []prompt.Suggest
- func EnumFlagArg(prefix string, enumFlag *cmd.EnumFlag) []prompt.Suggest
- func FileArg(prefix string, suffix string, dirOnly bool) []prompt.Suggest
- func InfoHashArg(prefix string, clientName string) []prompt.Suggest
- func InfoHashOrFilterArg(prefix string, clientName string) []prompt.Suggest
- func SiteArg(prefix string) []prompt.Suggest
- func SiteOrGroupArg(prefix string) []prompt.Suggest
- type InputFlag
- type InputingCommand
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ClientOrSiteArg ¶
func ClientOrSiteArg(prefix string) []prompt.Suggest
func ClientOrSiteOrGroupArg ¶
func ClientOrSiteOrGroupArg(prefix string) []prompt.Suggest
func EnumFlagArg ¶
func InfoHashArg ¶
func InfoHashOrFilterArg ¶
func SiteOrGroupArg ¶
func SiteOrGroupArg(prefix string) []prompt.Suggest
Types ¶
type InputingCommand ¶
type InputingCommand struct { // normal (positional) args of the inputing command Args []string MatchingPrefix string // the prefix of inputing arg or flag, could be an empty string. // count of positional args, excluding the last arg if it self is positional flag. // eg: "brush --dry-run --max-sites 10 local mteam" => 2, // as "brush" and "local" are positional args. last arg "mteam" also is, but is not counted. // "--dry-run" and "--max-sites 10" are flags. LastArgIndex int64 LastArgIsFlag bool // if last arg is a flag LastArgFlag string // the flag name of last arg }
parsed info of current inputing ptool command
func Parse ¶
func Parse(document *prompt.Document) *InputingCommand
parse current inputing ptool command (from start to cursor). everything after cursor is ignored. this func requires external info to discriminate whether a flag is pure or not
Click to show internal directories.
Click to hide internal directories.