pub struct ExVerb {
pub full: &'static str,
pub min: usize,
pub plain: &'static str,
pub forced: &'static str,
}Expand description
One ex command’s spelling rule.
plain and forced are separate registered command names rather than one
name plus a bang argument. A command body receives &[String] and nothing
else, so a bang passed as an argument is a convention every body has to
remember to read — and the one that forgets quits without asking. Two
names cannot be misread, and both show up in --commands saying what they
do. Verbs for which ! changes nothing (writing has no force semantics
here — escriba has no read-only flag to override) point both fields at the
same command, which is the honest encoding of “the bang is accepted and
means nothing”.
Fields§
§full: &'static strThe full spelling, as :help ex-cmd-index writes it.
min: usizeThe fewest characters that select it. full[..min] is what vim
prints in square-bracket notation: :q[uit] is ("quit", 1).
plain: &'static strThe registered command the plain form dispatches to.
forced: &'static strThe registered command the ! form dispatches to.