============================== zsh (macOS) keyboard shortcuts ============================== First published at 9/20/2022 on https://defkey.com/zsh-z-shell-mac-shortcuts The Z shell (Zsh) is a Unix shell that can be used as an interactive login shell and as a command interpreter for shell scripting. The software was initially released in 1990. zsh (macOS) has 27 shortcuts and we have listed all of them below. Navigation ---------- Control + A Move the cursor to the beginning of the line Control + E Move the cursor to the end of the line Option + Left arrow Move the cursor one word backward Option + Right arrow Move the cursor one word forward Left arrow Move the cursor one character backward Right arrow Move the cursor one character forward Deletion -------- Control + U Delete the current line Control + K Delete from the cursor to the end of the line Esc + Backspace Delete one word backward Control + W Delete one word backward Control + D Delete one character forward Fn + Backspace Delete one character forward Backspace Delete one character backward Control + L Clear the screen Undo ---- Control + _ Undo the last change Process and Shell ----------------- Control + C Terminate the running foreground process Control + Z Suspend the running foreground process Control + D Exit current shell History ------- Up arrow Recall the previous command in history Down arrow Recall the next command in history Control + R Search the command history Control + G Escape from command search mode ! then ! Execute the last typed command ! then P then W Execute the last command in history that begins with pw Auto-completion --------------- Tab Auto-complete the typed command Tab then Tab Show list of commands Tab then Tab then Tab. Cycle through matched commands List all keyboard shortcuts --------------------------- % bindkey Last modified on (UTC): Wednesday, September 21, 2022 Defkey © All rights reserved.