mirror of
https://github.com/nushell/nushell
synced 2024-12-27 05:23:11 +00:00
added documentation of available binding options (#2246)
straight from the rustyline source code
This commit is contained in:
parent
e71f44d26f
commit
0c20282200
1 changed files with 234 additions and 0 deletions
|
@ -6,7 +6,9 @@
|
|||
# Ctrl: A
|
||||
# Available modifiers are Ctrl, F (for function), Meta (escape-char, alt-char)
|
||||
|
||||
##########################################################
|
||||
# Common From https://github.com/kkawakam/rustyline#actions
|
||||
##########################################################
|
||||
|
||||
# Move cursor to the beginning of line
|
||||
- key:
|
||||
|
@ -34,6 +36,12 @@
|
|||
Move:
|
||||
ForwardChar: 1
|
||||
|
||||
# Complete Hint
|
||||
- key:
|
||||
ShiftRight:
|
||||
binding:
|
||||
CompleteHint:
|
||||
|
||||
# Interrupt/Cancel edition
|
||||
- key:
|
||||
Ctrl: C
|
||||
|
@ -148,3 +156,229 @@
|
|||
binding:
|
||||
Noop:
|
||||
|
||||
##########################################################
|
||||
# Possible options for key:
|
||||
##########################################################
|
||||
# /// Unsupported escape sequence (on unix platform)
|
||||
# UnknownEscSeq,
|
||||
# /// ⌫ or `KeyPress::Ctrl('H')`
|
||||
# Backspace,
|
||||
# /// ⇤ (usually Shift-Tab)
|
||||
# BackTab,
|
||||
# /// Paste (on unix platform)
|
||||
# BracketedPasteStart,
|
||||
# /// Paste (on unix platform)
|
||||
# BracketedPasteEnd,
|
||||
# /// Single char
|
||||
# Char(char),
|
||||
# /// Ctrl-↓
|
||||
# ControlDown,
|
||||
# /// Ctrl-←
|
||||
# ControlLeft,
|
||||
# /// Ctrl-→
|
||||
# ControlRight,
|
||||
# /// Ctrl-↑
|
||||
# ControlUp,
|
||||
# /// Ctrl-char
|
||||
# Ctrl(char),
|
||||
# /// ⌦
|
||||
# Delete,
|
||||
# /// ↓ arrow key
|
||||
# Down,
|
||||
# /// ⇲
|
||||
# End,
|
||||
# /// ↵ or `KeyPress::Ctrl('M')`
|
||||
# Enter,
|
||||
# /// Escape or `KeyPress::Ctrl('[')`
|
||||
# Esc,
|
||||
# /// Function key
|
||||
# F(u8),
|
||||
# /// ⇱
|
||||
# Home,
|
||||
# /// Insert key
|
||||
# Insert,
|
||||
# /// ← arrow key
|
||||
# Left,
|
||||
# /// Escape-char or Alt-char
|
||||
# Meta(char),
|
||||
# /// `KeyPress::Char('\0')`
|
||||
# Null,
|
||||
# /// ⇟
|
||||
# PageDown,
|
||||
# /// ⇞
|
||||
# PageUp,
|
||||
# /// → arrow key
|
||||
# Right,
|
||||
# /// Shift-↓
|
||||
# ShiftDown,
|
||||
# /// Shift-←
|
||||
# ShiftLeft,
|
||||
# /// Shift-→
|
||||
# ShiftRight,
|
||||
# /// Shift-↑
|
||||
# ShiftUp,
|
||||
# /// ⇥ or `KeyPress::Ctrl('I')`
|
||||
# Tab,
|
||||
# /// ↑ arrow key
|
||||
# Up,
|
||||
|
||||
##########################################################
|
||||
# Possible options for command binding
|
||||
##########################################################
|
||||
# /// abort
|
||||
# Abort, // Miscellaneous Command
|
||||
# /// accept-line
|
||||
# AcceptLine,
|
||||
# /// beginning-of-history
|
||||
# BeginningOfHistory,
|
||||
# /// capitalize-word
|
||||
# CapitalizeWord,
|
||||
# /// clear-screen
|
||||
# ClearScreen,
|
||||
# /// complete
|
||||
# Complete,
|
||||
# /// complete-backward
|
||||
# CompleteBackward,
|
||||
# /// complete-hint
|
||||
# CompleteHint,
|
||||
# /// downcase-word
|
||||
# DowncaseWord,
|
||||
# /// vi-eof-maybe
|
||||
# EndOfFile,
|
||||
# /// end-of-history
|
||||
# EndOfHistory,
|
||||
# /// forward-search-history
|
||||
# ForwardSearchHistory,
|
||||
# /// history-search-backward
|
||||
# HistorySearchBackward,
|
||||
# /// history-search-forward
|
||||
# HistorySearchForward,
|
||||
# /// Insert text
|
||||
# Insert(RepeatCount, String),
|
||||
# /// Interrupt signal (Ctrl-C)
|
||||
# Interrupt,
|
||||
# /// 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
|
||||
# Kill(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
|
||||
# Move(Movement),
|
||||
# /// next-history
|
||||
# NextHistory,
|
||||
# /// No action
|
||||
# Noop,
|
||||
# /// vi-replace
|
||||
# Overwrite(char),
|
||||
# /// previous-history
|
||||
# PreviousHistory,
|
||||
# /// quoted-insert
|
||||
# QuotedInsert,
|
||||
# /// vi-change-char
|
||||
# ReplaceChar(RepeatCount, char),
|
||||
# /// vi-change-to, vi-substitute
|
||||
# Replace(Movement, Option<String>),
|
||||
# /// reverse-search-history
|
||||
# ReverseSearchHistory,
|
||||
# /// self-insert
|
||||
# SelfInsert(RepeatCount, char),
|
||||
# /// Suspend signal (Ctrl-Z on unix platform)
|
||||
# Suspend,
|
||||
# /// transpose-chars
|
||||
# TransposeChars,
|
||||
# /// transpose-words
|
||||
# TransposeWords(RepeatCount),
|
||||
# /// undo
|
||||
# Undo(RepeatCount),
|
||||
# /// Unsupported / unexpected
|
||||
# Unknown,
|
||||
# /// upcase-word
|
||||
# UpcaseWord,
|
||||
# /// vi-yank-to
|
||||
# ViYankTo(Movement),
|
||||
# /// yank, vi-put
|
||||
# Yank(RepeatCount, Anchor),
|
||||
# /// yank-pop
|
||||
# YankPop,
|
||||
# /// moves cursor to the line above or switches to prev history entry if
|
||||
# /// the cursor is already on the first line
|
||||
# LineUpOrPreviousHistory(RepeatCount),
|
||||
# /// moves cursor to the line below or switches to next history entry if
|
||||
# /// the cursor is already on the last line
|
||||
# LineDownOrNextHistory(RepeatCount),
|
||||
# /// accepts the line when cursor is at the end of the text (non including
|
||||
# /// trailing whitespace), inserts newline character otherwise
|
||||
# AcceptOrInsertLine,
|
||||
|
||||
##########################################################
|
||||
# Possible options for Word
|
||||
##########################################################
|
||||
# /// non-blanks characters
|
||||
# Big,
|
||||
# /// alphanumeric characters
|
||||
# Emacs,
|
||||
# /// alphanumeric (and '_') characters
|
||||
# Vi,
|
||||
|
||||
##########################################################
|
||||
# Possible options for At
|
||||
##########################################################
|
||||
# /// Start of word.
|
||||
# Start,
|
||||
# /// Before end of word.
|
||||
# BeforeEnd,
|
||||
# /// After end of word.
|
||||
# AfterEnd,
|
||||
|
||||
##########################################################
|
||||
# Possible options for Anchor
|
||||
##########################################################
|
||||
# /// After cursor
|
||||
# After,
|
||||
# /// Before cursor
|
||||
# Before,
|
||||
|
||||
##########################################################
|
||||
# Possible options for CharSearch
|
||||
##########################################################
|
||||
# /// Forward search
|
||||
# Forward(char),
|
||||
# /// Forward search until
|
||||
# ForwardBefore(char),
|
||||
# /// Backward search
|
||||
# Backward(char),
|
||||
# /// Backward search until
|
||||
# BackwardAfter(char),
|
||||
|
||||
##########################################################
|
||||
# Possible options for Movement
|
||||
##########################################################
|
||||
# /// Whole current line (not really a movement but a range)
|
||||
# WholeLine,
|
||||
# /// beginning-of-line
|
||||
# BeginningOfLine,
|
||||
# /// end-of-line
|
||||
# EndOfLine,
|
||||
# /// backward-word, vi-prev-word
|
||||
# BackwardWord(RepeatCount, Word), // Backward until start of word
|
||||
# /// forward-word, vi-end-word, vi-next-word
|
||||
# ForwardWord(RepeatCount, At, Word), // Forward until start/end of word
|
||||
# /// vi-char-search
|
||||
# ViCharSearch(RepeatCount, CharSearch),
|
||||
# /// vi-first-print
|
||||
# ViFirstPrint,
|
||||
# /// backward-char
|
||||
# BackwardChar(RepeatCount),
|
||||
# /// forward-char
|
||||
# ForwardChar(RepeatCount),
|
||||
# /// move to the same column on the previous line
|
||||
# LineUp(RepeatCount),
|
||||
# /// move to the same column on the next line
|
||||
# LineDown(RepeatCount),
|
||||
# /// Whole user input (not really a movement but a range)
|
||||
# WholeBuffer,
|
||||
# /// beginning-of-buffer
|
||||
# BeginningOfBuffer,
|
||||
# /// end-of-buffer
|
||||
# EndOfBuffer,
|
Loading…
Reference in a new issue