{"modulePath":"github.com/wavetermdev/waveterm/wavesrv","version":"v0.7.6","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package comp\n\nscripthaus completion\n\n## Constants\n\n```go\nconst (\n\t// local to simplecomp\n\tCGTypeCommand  = \"command\"\n\tCGTypeFile     = \"file\"\n\tCGTypeDir      = \"directory\"\n\tCGTypeVariable = \"variable\"\n\n\t// implemented in cmdrunner\n\tCGTypeMeta        = \"metacmd\"\n\tCGTypeCommandMeta = \"command+meta\"\n\n\tCGTypeRemote         = \"remote\"\n\tCGTypeRemoteInstance = \"remoteinstance\"\n\tCGTypeGlobalCmd      = \"globalcmd\"\n)\n```\n\n```go\nconst (\n\tQuoteTypeLiteral = \"\"\n\tQuoteTypeDQ      = \"\\\"\"\n\tQuoteTypeANSI    = \"$'\"\n\tQuoteTypeSQ      = \"'\"\n)\n```\n\n```go\nconst MaxCompQuoteLen = 5000\n```\n\n## Variables\n\n```go\nvar SimpleCompGenFns map[string]SimpleCompGenFnType\n```\n\n## Functions\n\n```go\nfunc RegisterSimpleCompFn(compType string, fn SimpleCompGenFnType)\n```\n\n```go\nfunc SortCompReturnEntries(c *CompReturn)\n```\n\n## Types\n\n```go\ntype CompContext struct {\n\tRemotePtr  *sstore.RemotePtrType\n\tCwd        string\n\tForDisplay bool\n}\n```\n\n```go\ntype CompEntry struct {\n\tWord      string\n\tIsMetaCmd bool\n}\n```\ndirectories will have a trailing \"/\"\n\n```go\ntype CompPoint struct {\n\tStmtStr     string\n\tWords       []ParsedWord\n\tCompWord    int\n\tCompWordPos int\n\tPrefix      string\n\tSuffix      string\n}\n```\n\n```go\nfunc ParseCompPoint(cmdStr utilfn.StrWithPos) *CompPoint\n```\n\n```go\nfunc (p *CompPoint) FullyExtend(crtn *CompReturn) utilfn.StrWithPos\n```\n\n```go\ntype CompReturn struct {\n\tCompType string\n\tEntries  []CompEntry\n\tHasMore  bool\n}\n```\n\n```go\nfunc CombineCompReturn(compType string, c1 *CompReturn, c2 *CompReturn) *CompReturn\n```\n\n```go\nfunc DoCompGen(ctx context.Context, cmdStr utilfn.StrWithPos, compCtx CompContext) (*CompReturn, *utilfn.StrWithPos, error)\n```\n\n```go\nfunc DoCompGenOld(ctx context.Context, sp utilfn.StrWithPos, compCtx CompContext) (*CompReturn, *utilfn.StrWithPos, error)\n```\n\n```go\nfunc DoSimpleComp(ctx context.Context, compType string, prefix string, compCtx CompContext, args []interface{}) (*CompReturn, error)\n```\n\n```go\nfunc (c *CompReturn) GetCompDisplayStrs() []string\n```\n\n```go\nfunc (c *CompReturn) GetCompStrs() []string\n```\n\n```go\ntype ParsedWord struct {\n\tOffset      int\n\tWord        *syntax.Word\n\tPartialWord string\n\tPrefix      string\n}\n```\n\n```go\ntype SimpleCompGenFnType = func(ctx context.Context, prefix string, compCtx CompContext, args []interface{}) (*CompReturn, error)\n```\n\n","path":"github.com/wavetermdev/waveterm/wavesrv/pkg/comp","name":"comp","synopsis":"scripthaus completion","isRedistributable":true}
