Skip to main content

Module substitution

Module substitution 

Source
Expand description

Substitution Engine for start-command

Parses .lino files and matches natural language commands to shell commands. Uses Links Notation style patterns with variables like $packageName, $version

Structs§

ProcessOptions
Options for processing a command
Rule
A substitution rule parsed from a .lino file
SubstitutionResult
Result of matching and substituting a command

Functions§

create_rule
Create a rule object from pattern and replacement strings
load_default_substitutions
Load default substitutions from the package’s substitutions.lino file
load_user_substitutions
Load user substitutions from custom path or home directory
match_and_substitute
Match input against rules and return the substituted command
parse_lino_content
Parse .lino content string
parse_lino_file
Parse a .lino substitutions file
process_command
Process a command through the substitution engine
sort_rules_by_specificity
Sort rules so more specific patterns (more variables, longer patterns) match first