Enum Cmd
enum Cmd
Commands
Variants
-
Abort abort
-
AcceptLine accept-line
See also
AcceptOrInsertLine-
BeginningOfHistory beginning-of-history
-
CapitalizeWord capitalize-word
-
ClearScreen clear-screen
-
Complete complete
-
CompleteBackward complete-backward
-
CompleteHint complete-hint
-
Dedent(Movement) Dedent current line
-
DowncaseWord downcase-word
-
EndOfFile vi-eof-maybe
-
EndOfHistory end-of-history
-
ForwardSearchHistory forward-search-history (incremental search)
-
HistorySearchBackward history-search-backward (common prefix search)
-
HistorySearchForward history-search-forward (common prefix search)
-
Indent(Movement) Indent current line
-
Insert(RepeatCount, String) Insert text
-
Interrupt 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
-
NextHistory next-history
-
Noop No action
-
Repaint repaint
-
Overwrite(char) vi-replace
-
PreviousHistory previous-history
-
QuotedInsert quoted-insert
-
ReplaceChar(RepeatCount, char) vi-change-char
-
Replace(Movement, Option<String>) vi-change-to, vi-substitute
-
ReverseSearchHistory reverse-search-history (incremental search)
-
SelfInsert(RepeatCount, char) self-insert
-
Suspend Suspend signal (Ctrl-Z on unix platform)
-
TransposeChars transpose-chars
-
TransposeWords(RepeatCount) transpose-words
-
Undo(RepeatCount) undo
-
Unknown Unsupported / unexpected
-
UpcaseWord upcase-word
-
ViYankTo(Movement) vi-yank-to
-
Yank(RepeatCount, Anchor) yank, vi-put
-
YankPop 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
-
Newline Inserts a newline
-
AcceptOrInsertLine { accept_in_the_middle: bool } 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: truefor mostly single-line cases, for example command-line. - Use
accept_in_the_middle: falsefor mostly multi-line cases, for example SQL or JSON input.
- Use
Implementations
impl Cmd
const fn should_reset_kill_ring(self: &Self) -> boolTells if current command should reset kill ring.
impl Clone for Cmd
fn clone(self: &Self) -> Cmd
impl Debug for Cmd
fn fmt(self: &Self, f: &mut Formatter<'_>) -> Result
impl Eq for Cmd
impl Freeze for Cmd
impl PartialEq for Cmd
fn eq(self: &Self, other: &Cmd) -> bool
impl RefUnwindSafe for Cmd
impl Send for Cmd
impl StructuralPartialEq for Cmd
impl Sync for Cmd
impl Unpin for Cmd
impl UnsafeUnpin for Cmd
impl UnwindSafe for Cmd
impl<T> Any for Cmd
fn type_id(self: &Self) -> TypeId
impl<T> Borrow for Cmd
fn borrow(self: &Self) -> &T
impl<T> BorrowMut for Cmd
fn borrow_mut(self: &mut Self) -> &mut T
impl<T> CloneToUninit for Cmd
unsafe fn clone_to_uninit(self: &Self, dest: *mut u8)
impl<T> From for Cmd
fn from(t: T) -> TReturns the argument unchanged.
impl<T> ToOwned for Cmd
fn to_owned(self: &Self) -> Tfn clone_into(self: &Self, target: &mut T)
impl<T, U> Into for Cmd
fn into(self: Self) -> UCalls
U::from(self).That is, this conversion is whatever the implementation of
[From]<T> for Uchooses to do.
impl<T, U> TryFrom for Cmd
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
impl<T, U> TryInto for Cmd
fn try_into(self: Self) -> Result<U, <U as TryFrom<T>>::Error>