Nushell#

The structured-data shell (nu). Nushell uses Reedline (its own Rust line editor) with a menu-driven model: a single key opens a completion menu, history menu, or help menu, and arrow keys / Enter navigate it. Many bindings overlap with the readline conventions, but the menu model is the distinctive piece.

Default edit mode is emacs; switch with $env.config.edit_mode = "vi" in $nu.config-path. List active bindings with keybindings list -m; list named events with keybindings list -e; reset with keybindings default.

For startup files, $env.config keys, and plugin loading, see Nushell.

Cursor Movement#

Key

Action

Ctrl-a

move to start of line

Ctrl-e

move to end of line

Ctrl-b

move back one character

Ctrl-f

move forward one character

Alt-b

move back one word

Alt-f

move forward one word

Left / Right

one character (or accept-next-suggestion-word on Right)

Home / End

start / end of line

Editing#

Key

Action

Ctrl-d

delete character under cursor (EOF on empty line)

Ctrl-h / Backspace

delete character before cursor

Alt-d

delete word forward

Ctrl-w

delete word backward

Alt-Backspace

delete word backward (alphanumeric-aware)

Ctrl-k

cut to end of line

Ctrl-u

cut whole line

Ctrl-y

paste from cut buffer

Ctrl-t

transpose character with previous

Alt-t

transpose word with previous

Alt-u

uppercase word

Alt-l

lowercase word

Alt-c

capitalize word

Ctrl-z

undo (Reedline; not SIGTSTP in nu)

Ctrl-Shift-z / Ctrl-G

redo

History#

Key

Action

Up / Ctrl-p

previous history line

Down / Ctrl-n

next history line

Ctrl-r

open searchable history menu

Alt-.

insert last argument of previous command

history

print full history

history | where command =~ git

filter history (nu-native)

Process Control#

Key

Action

Ctrl-c

cancel current line / interrupt command

Ctrl-d

send EOF; exit shell on empty line

Ctrl-l

clear screen

Ctrl-s

pause terminal output (XOFF)

Ctrl-q

resume terminal output (XON)

Vi Mode#

Enable with $env.config.edit_mode = "vi" in $nu.config-path. Two main modes: insert and normal; visual for selection.

Key

Action

Esc

enter normal mode

i / a / I / A

insert / append at cursor / start / end

0 / ^ / $

move to start / first non-blank / end of line

w / b / e

word forward / back / end

f<c> / F<c>

find next / previous character c

x

delete character under cursor

dw / d$ / dd

delete word / to end / whole line

cw / c$ / cc

change word / to end / whole line

yw / y$ / yy

yank word / to end / whole line

p / P

paste after / before cursor

u

undo

v

enter visual (selection) mode

k / j

previous / next history line (normal mode)

Config and Discovery#

Command

Action

keybindings list

list every key (paginated)

keybindings list -m

list with the modifier each requires

keybindings list -e

list named edit / menu / motion events

keybindings default

reset all bindings to defaults

$env.config.edit_mode = "vi"

switch to vi mode (set in $nu.config-path)

$env.config.edit_mode = "emacs"

switch to emacs mode

config nu

open the config file in $EDITOR

config reset

regenerate default config

$env.config.keybindings = [...]

declare custom bindings (table of name / modifier / keycode / mode / event)

help <command>

inline help for any command

stty -a

list terminal-driver shortcuts