pub enum MenuAction {
Show 27 variants
Accept,
AcceptAndMenuComplete,
AcceptAndInferNextHistory,
Cancel,
Up,
Down,
Left,
Right,
PageUp,
PageDown,
Beginning,
End,
BeginningOfLine,
EndOfLine,
Next,
Prev,
NextGroup,
PrevGroup,
ToggleInteractive,
SearchForward,
SearchBackward,
Undo,
Redisplay,
Search,
ClearSearch,
Insert(char),
Backspace,
}Expand description
Key actions for menu completion (maps to zsh widget bindings)
These actions match zsh’s Src/Zle/complist.c behavior exactly:
- Navigation (Up/Down/Left/Right) moves in the menu grid with wrapping
- Accept exits the menu and inserts the selection
- AcceptAndMenuComplete accepts current, then runs a NEW completion cycle
- AcceptAndInferNextHistory same as above (both push state stack, call do_menucmp)
- ReverseMenuComplete cycles to previous match via completion (not just prev item)
- ToggleInteractive enters/exits MM_INTER mode for type-to-filter
- SearchForward/Backward enters MM_FSEARCH/MM_BSEARCH incremental search
Variants§
Accept
Exit menu, accept current selection (accept-line)
AcceptAndMenuComplete
Accept current + trigger NEW completion on modified line (accept-and-menu-complete) This is NOT “advance to next item” - it runs a fresh completion cycle
AcceptAndInferNextHistory
Accept current + trigger NEW completion (accept-and-infer-next-history) Same behavior as AcceptAndMenuComplete in menuselect context
Cancel
Exit menu without accepting (send-break)
Up
Move up in menu grid, wrap to bottom+left at top (up-history)
Down
Move down in menu grid, wrap to top+right at bottom (down-history)
Left
Move left in menu grid, wrap to prev row at col 0 (vi-backward-char)
Right
Move right in menu grid, wrap to next row at end (vi-forward-char)
PageUp
Page up by screenful (vi-backward-word)
PageDown
Page down by screenful (vi-forward-word)
Beginning
Jump to first item (beginning-of-history)
End
Jump to last item (end-of-history)
BeginningOfLine
Jump to beginning of current row (vi-beginning-of-line)
EndOfLine
Jump to end of current row (vi-end-of-line)
Next
Cycle to next match via completion (menu-complete)
Prev
Cycle to previous match via completion with zmult=-1 (reverse-menu-complete) This calls do_menucmp(0) with negative multiplier
NextGroup
Jump to next group (vi-forward-blank-word)
PrevGroup
Jump to previous group (vi-backward-blank-word)
ToggleInteractive
Toggle interactive/filter mode MM_INTER (vi-insert)
SearchForward
Enter forward incremental search MM_FSEARCH (history-incremental-search-forward)
SearchBackward
Enter backward incremental search MM_BSEARCH (history-incremental-search-backward)
Undo
Undo last accept (pops from menu stack)
Redisplay
Force redisplay
Search
Generic search (alias for SearchForward)
ClearSearch
Clear current search string
Insert(char)
Insert character (in interactive/search mode)
Backspace
Delete last character (in interactive/search mode)
Trait Implementations§
Source§impl Clone for MenuAction
impl Clone for MenuAction
Source§fn clone(&self) -> MenuAction
fn clone(&self) -> MenuAction
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for MenuAction
impl Debug for MenuAction
Source§impl PartialEq for MenuAction
impl PartialEq for MenuAction
impl Copy for MenuAction
impl Eq for MenuAction
impl StructuralPartialEq for MenuAction
Auto Trait Implementations§
impl Freeze for MenuAction
impl RefUnwindSafe for MenuAction
impl Send for MenuAction
impl Sync for MenuAction
impl Unpin for MenuAction
impl UnsafeUnpin for MenuAction
impl UnwindSafe for MenuAction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more