Enum rustyline::Cmd [−][src]
#[non_exhaustive] pub enum Cmd {}Show 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(Movement)
Dedent current line
downcase-word
vi-eof-maybe
end-of-history
forward-search-history
history-search-backward
history-search-forward
Indent(Movement)
Indent current line
Insert(RepeatCount, String)
Insert text
Interrupt signal (Ctrl-C)
Kill(Movement)
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
Move(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
next-history
No action
Overwrite(char)
vi-replace
previous-history
quoted-insert
ReplaceChar(RepeatCount, char)
vi-change-char
vi-change-to, vi-substitute
reverse-search-history
SelfInsert(RepeatCount, char)
self-insert
Suspend signal (Ctrl-Z on unix platform)
transpose-chars
TransposeWords(RepeatCount)
transpose-words
Undo(RepeatCount)
undo
Unsupported / unexpected
upcase-word
ViYankTo(Movement)
vi-yank-to
Yank(RepeatCount, Anchor)
yank, vi-put
yank-pop
LineUpOrPreviousHistory(RepeatCount)
moves cursor to the line above or switches to prev history entry if the cursor is already on the first line
LineDownOrNextHistory(RepeatCount)
moves cursor to the line below or switches to next history entry if the cursor is already on the last line
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.
Show fields
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
impl Cmd
[src]
impl Cmd
[src]pub fn should_reset_kill_ring(&self) -> bool
[src]
pub fn should_reset_kill_ring(&self) -> bool
[src]Tells if current command should reset kill ring.
Trait Implementations
impl From<Cmd> for EventHandler
[src]
impl From<Cmd> for EventHandler
[src]fn from(c: Cmd) -> EventHandler
[src]
fn from(c: Cmd) -> EventHandler
[src]Performs the conversion.
impl StructuralPartialEq for Cmd
[src]
Auto Trait Implementations
impl RefUnwindSafe for Cmd
impl Send for Cmd
impl Sync for Cmd
impl Unpin for Cmd
impl UnwindSafe for Cmd
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> ToOwned for T where
T: Clone,
[src]
impl<T> ToOwned for T where
T: Clone,
[src]type Owned = T
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn to_owned(&self) -> T
[src]Creates owned data from borrowed data, usually by cloning. Read more
pub fn clone_into(&self, target: &mut T)
[src]
pub fn clone_into(&self, target: &mut T)
[src]🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more