Documentation ¶
Overview ¶
scripthaus completion
Index ¶
- Constants
- Variables
- func RegisterSimpleCompFn(compType string, fn SimpleCompGenFnType)
- func SortCompReturnEntries(c *CompReturn)
- type CompContext
- type CompEntry
- type CompPoint
- type CompReturn
- func CombineCompReturn(compType string, c1 *CompReturn, c2 *CompReturn) *CompReturn
- func DoCompGen(ctx context.Context, cmdStr utilfn.StrWithPos, compCtx CompContext) (*CompReturn, *utilfn.StrWithPos, error)
- func DoCompGenOld(ctx context.Context, sp utilfn.StrWithPos, compCtx CompContext) (*CompReturn, *utilfn.StrWithPos, error)
- func DoSimpleComp(ctx context.Context, compType string, prefix string, compCtx CompContext, ...) (*CompReturn, error)
- type ParsedWord
- type SimpleCompGenFnType
Constants ¶
View Source
const ( // local to simplecomp CGTypeCommand = "command" CGTypeFile = "file" CGTypeDir = "directory" CGTypeVariable = "variable" // implemented in cmdrunner CGTypeMeta = "metacmd" CGTypeCommandMeta = "command+meta" CGTypeRemote = "remote" CGTypeRemoteInstance = "remoteinstance" CGTypeGlobalCmd = "globalcmd" )
View Source
const ( QuoteTypeLiteral = "" QuoteTypeDQ = "\"" QuoteTypeANSI = "$'" QuoteTypeSQ = "'" )
View Source
const MaxCompQuoteLen = 5000
Variables ¶
View Source
var SimpleCompGenFns map[string]SimpleCompGenFnType
Functions ¶
func RegisterSimpleCompFn ¶
func RegisterSimpleCompFn(compType string, fn SimpleCompGenFnType)
func SortCompReturnEntries ¶
func SortCompReturnEntries(c *CompReturn)
Types ¶
type CompContext ¶
type CompContext struct { RemotePtr *sstore.RemotePtrType Cwd string ForDisplay bool }
type CompPoint ¶
type CompPoint struct { StmtStr string Words []ParsedWord CompWord int CompWordPos int Prefix string Suffix string }
func ParseCompPoint ¶
func ParseCompPoint(cmdStr utilfn.StrWithPos) *CompPoint
func (*CompPoint) FullyExtend ¶
func (p *CompPoint) FullyExtend(crtn *CompReturn) utilfn.StrWithPos
type CompReturn ¶
func CombineCompReturn ¶
func CombineCompReturn(compType string, c1 *CompReturn, c2 *CompReturn) *CompReturn
func DoCompGen ¶
func DoCompGen(ctx context.Context, cmdStr utilfn.StrWithPos, compCtx CompContext) (*CompReturn, *utilfn.StrWithPos, error)
func DoCompGenOld ¶
func DoCompGenOld(ctx context.Context, sp utilfn.StrWithPos, compCtx CompContext) (*CompReturn, *utilfn.StrWithPos, error)
func DoSimpleComp ¶
func DoSimpleComp(ctx context.Context, compType string, prefix string, compCtx CompContext, args []interface{}) (*CompReturn, error)
func (*CompReturn) GetCompDisplayStrs ¶
func (c *CompReturn) GetCompDisplayStrs() []string
func (*CompReturn) GetCompStrs ¶
func (c *CompReturn) GetCompStrs() []string
type ParsedWord ¶
type SimpleCompGenFnType ¶
type SimpleCompGenFnType = func(ctx context.Context, prefix string, compCtx CompContext, args []interface{}) (*CompReturn, error)
Click to show internal directories.
Click to hide internal directories.