Skip to main content

Module suggest

Module suggest 

Source
Expand description

“Did you mean …?”: the names closest to a mistyped one (a command id, a parameter key), and a one-line summary of a command’s parameters, so an error can say what to call instead.

Functions§

closest
Up to max of candidates closest to name, best first: a different case, then a small spelling distance (at most a third of the name’s length, at least 2), then names that share the last dotted segment (layer.delete → edit.delete) or contain the name, then names that hold its letters in order. Empty when nothing is close.
did_you_mean_command
did you mean a{params},b {params}? for an unknown command id, from the commands an app lists; None when no command is close.
params_summary
A command’s parameters on one line: its text doc as written, or the keys of its schema ({clip, time?, seconds?}, optional ones marked ?); {} when it takes none. Long docs are cut at about 240 characters.