[−][src]Enum rustyline::Cmd
Commands
Variants (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.
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]
pub fn should_reset_kill_ring(&self) -> bool
[src]
Tells if current command should reset kill ring.
Trait Implementations
impl Clone for Cmd
[src]
impl Debug for Cmd
[src]
impl PartialEq<Cmd> for Cmd
[src]
impl StructuralPartialEq for Cmd
[src]
Auto Trait Implementations
impl RefUnwindSafe for Cmd
[src]
impl Send for Cmd
[src]
impl Sync for Cmd
[src]
impl Unpin for Cmd
[src]
impl UnwindSafe for Cmd
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,