Skip to content

Instantly share code, notes, and snippets.

@robjens
Last active August 29, 2015 14:19
Show Gist options
  • Save robjens/93307a48e59297c4dc97 to your computer and use it in GitHub Desktop.
Save robjens/93307a48e59297c4dc97 to your computer and use it in GitHub Desktop.
Zsh tips and tricks

Z-shell

Abstract

Zsh has an extremely powerful and flexible system of programmable widgets (zstyle), key bindings (bind), autocompletion (compinit), formatting (zformat), option parsing (zparseopts) and much more.

Some of the more well, and lesser known, parts or tidbits of wisdom I found out myself and researched online, shall be gathered here.

This assumes a baseline zsh with antigen setup leveraging the libraries found in oh-my-zsh.

Signals and other standard Unix

Term (SIGTERM): ctrl+c Kill (SIGQUIT): ctrl+d Background (job): ctrl+z

Navigation (emacs mode)

  1. Jump words back: ctrl+left or alt+b

  2. Jump words forward: ctrl+right or alt+f

  3. Jump char back: ctrl+b

  4. Jump char forward: ctrl+f

  5. Beginning of line: ctrl+a

  6. End of line: ctrl+e

Editing

  1. Cut entire line: ctrl+u

  2. Cut to end of line: ctrl+k

  3. Paste line: ctrl+y

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment