Enum rustyline::Cmd [−][src]
#[non_exhaustive] pub enum Cmd {}Show 42 variants
Abort, AcceptLine, BeginningOfHistory, CapitalizeWord, ClearScreen, Complete, CompleteBackward, CompleteHint, Dedent(Movement), DowncaseWord, EndOfFile, EndOfHistory, ForwardSearchHistory, HistorySearchBackward, HistorySearchForward, Indent(Movement), Insert(RepeatCount, String), Interrupt, Kill(Movement), Move(Movement), NextHistory, Noop, Overwrite(char), PreviousHistory, QuotedInsert, ReplaceChar(RepeatCount, char), Replace(Movement, Option<String>), ReverseSearchHistory, SelfInsert(RepeatCount, char), Suspend, TransposeChars, TransposeWords(RepeatCount), Undo(RepeatCount), Unknown, UpcaseWord, ViYankTo(Movement), Yank(RepeatCount, Anchor), YankPop, LineUpOrPreviousHistory(RepeatCount), LineDownOrNextHistory(RepeatCount), Newline, AcceptOrInsertLine { accept_in_the_middle: bool, },
Expand description
Commands
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
abort
accept-line
See also AcceptOrInsertLine
beginning-of-history
capitalize-word
clear-screen
complete
complete-backward
complete-hint
Dedent current line
Tuple Fields of Dedent
0: Movement
downcase-word
vi-eof-maybe
end-of-history
forward-search-history
history-search-backward
history-search-forward
Indent current line
Tuple Fields of Indent
0: Movement
Insert text
Tuple Fields of Insert
0: RepeatCount
1: String
Interrupt signal (Ctrl-C)
backward-delete-char, backward-kill-line, backward-kill-word delete-char, kill-line, kill-word, unix-line-discard, unix-word-rubout, vi-delete, vi-delete-to, vi-rubout
Tuple Fields of Kill
0: Movement
backward-char, backward-word, beginning-of-line, end-of-line, forward-char, forward-word, vi-char-search, vi-end-word, vi-next-word, vi-prev-word
Tuple Fields of Move
0: Movement
next-history
No action
vi-replace
Tuple Fields of Overwrite
0: char
previous-history
quoted-insert
vi-change-char
Tuple Fields of ReplaceChar
0: RepeatCount
1: char
vi-change-to, vi-substitute
reverse-search-history
self-insert
Tuple Fields of SelfInsert
0: RepeatCount
1: char
Suspend signal (Ctrl-Z on unix platform)
transpose-chars
transpose-words
Tuple Fields of TransposeWords
0: RepeatCount
undo
Tuple Fields of Undo
0: RepeatCount
Unsupported / unexpected
upcase-word
vi-yank-to
Tuple Fields of ViYankTo
0: Movement
yank, vi-put
Tuple Fields of Yank
0: RepeatCount
1: Anchor
yank-pop
moves cursor to the line above or switches to prev history entry if the cursor is already on the first line
Tuple Fields of LineUpOrPreviousHistory
0: RepeatCount
moves cursor to the line below or switches to next history entry if the cursor is already on the last line
Tuple Fields of LineDownOrNextHistory
0: RepeatCount
Inserts a newline
Either accepts or inserts a newline
Always inserts newline if input is non-valid. Can also insert newline if cursor is in the middle of the text
If you support multi-line input:
- Use
accept_in_the_middle: true
for mostly single-line cases, for example command-line. - Use
accept_in_the_middle: false
for mostly multi-line cases, for example SQL or JSON input.
Fields of AcceptOrInsertLine
accept_in_the_middle: bool
Whether this commands accepts input if the cursor not at the end of the current input
Implementations
Tells if current command should reset kill ring.
Trait Implementations
Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for Cmd
impl UnwindSafe for Cmd
Blanket Implementations
Mutably borrows from an owned value. Read more