Skip to main content

parse

Function parse 

Source
pub fn parse(line: &str) -> Option<Invocation>
Expand description

Parse a command line into the command to dispatch and its arguments.

None for an empty line — : then <CR> does nothing, as in vim, rather than dispatching the empty name and reporting it missing.

A word the grammar knows resolves through VERBS; anything else is passed through with its ! intact, so what the operator typed is what the “not found” report names. Silently stripping a bang off an unknown word would turn :Ghost! into a report about :Ghost, which is a report about a different thing than the one that failed.