Given a string consisting of a toolId followed by any number of arguments, locate the corresponding Tool and parse the arguments.
Tokens are delimited by whitespace.
The Tool is determined by finding the longest string of unquoted tokens starting at the beginning of the key-in string that matches a registered Tool's
Tokens following the Tool's keyin are parsed as arguments.
Arguments may be quoted using "double quotes". The opening quote must be preceded by whitespace. Examples, assuming the tool Id is
my keyin "abc" "def"=> two arguments:
my keyin abc"def"=> one argument:
abc"def"A literal double-quote character can be embedded in a quoted argument as follows:
my keyin "abc""def"=> one argument:
parseKeyin(keyin: string): ParseKeyinResult
@returns The tool, if found, along with an array of parsed arguments.
|keyin||string||A string consisting of a toolId followed by any number of arguments. The arguments are separated by whitespace.|
Returns - ParseKeyinResult
The tool, if found, along with an array of parsed arguments.
- core/frontend/src/tools/Tool.ts Line 1099
Last Updated: 04 December, 2023