lucee.Component
commandbox.system.util.jline.CommandCompletor
Copyright Since 2014 CommandBox by Ortus Solutions, Corp www.coldbox.org | www.ortussolutions.com I handle tab completion in the shell
| Property Summary | ||||
|---|---|---|---|---|
| type | property | default | serializable | required |
any
|
commandService
|
true
|
false
|
|
any
|
fileSystemUtil
|
true
|
false
|
|
any
|
logger
|
true
|
false
|
|
any
|
shell
|
true
|
false
|
|
| Constructor Summary | |
|---|---|
|
init()
Constructor. |
|
| Method Summary | |
|---|---|
private any
|
add([any candidates], [any name], [any group=''], [any description=''], [boolean complete='false'])
JLine3 needs an array of Java objects, so convert our array of strings to that. |
private any
|
addAllIfMatch([any candidates], [array additions], [any paramSoFar], [any paramName], [any namedParams])
Convience method since calling addAll() directly errors if each value isn't a string. |
private any
|
addCandidateIfMatch(any match, any startsWith, any candidates, [any paramName], [any namedParams])
add a value completion candidate if it matches what was typed so far. |
numeric
|
complete([any reader], [any parsedLine], [any candidates])
populate completion candidates and return cursor position. |
private any
|
paramValueCompletion([struct commandInfo], [String paramName], [String paramType], [String paramSoFar], any candidates, [boolean namedParams], [struct passedNamedParameters='[runtime expression]'])
populate completion candidates for parameter values. |
private any
|
pathCompletion([String startsWith], any candidates, [any showFiles='true'], [any paramName], [any namedParams])
Populate parameter value completion candidates. |
| Methods inherited from class lucee.Component |
|---|
| None |
| Constructor Detail |
|---|
Constructor
| Property Detail |
|---|
access - publicrequired - falsereturntype - anyinject - CommandServiceserializable - trueaccess - publicrequired - falsereturntype - anyinject - FileSystemserializable - trueaccess - publicrequired - falsereturntype - anyinject - logbox:logger:{this}serializable - trueaccess - publicrequired - falsereturntype - anyinject - Shellserializable - true| Method Detail |
|---|
JLine3 needs an array of Java objects, so convert our array of strings to that
candidatesnamegroupdescriptioncompleteConvience method since calling addAll() directly errors if each value isn't a string
candidates - Java TreeSet objectadditions - array of values to addparamSoFarparamNamenamedParamsadd a value completion candidate if it matches what was typed so far
match - text to compare as match or struct containing "name", "group", "description"startsWith - text typed so farcandidates - tree to populate with completion candidatesparamNamenamedParamspopulate completion candidates and return cursor position
readerparsedLine - a dynamic proxy wrapping an instance of `ArgumentList.cfc`candidates - tree to populate with completion candidatespopulate completion candidates for parameter values
commandInfo - struct representing the command being completed forparamName - param nameparamType - type of parameter (boolean, etc.)paramSoFar - text typed so farcandidates - tree to populate with completion candidatesnamedParamspassedNamedParametersPopulate parameter value completion candidates
startsWith - text typed so farcandidates - tree to populate with completion candidatesshowFilesparamNamenamedParams