Skip to content
On this page

Zsh

My shell of choice. My config for it can be seen here.

Notes

  • Exported variables get passed on to child processes. Non-exported variables do not.
  • I don't need to add function text before function definition.
  • Search zshall man page to find all zsh widgets and more things.
  • I can use zsh/zprof to profile zsh startup time. Docs for it can be seen in zshmodules.
  • zsh -x - See what Zsh executes when it starts new shell.
  • cmd - and TAB will list options for command.

Code

bash
# Read function definition
whence -f ..

# See where the it was defined
whence -v
bash
# Bind comand to alt key
# alt+i will run 'a' command.
# \e means opt key
bindkey -s '\ei' '^Ua^M'
bash
# See what is binded to a key
# See what is binding to ⌃ + E
bindkey '^E'
bash
# Run zsh without sourcing zshrc
zsh -f
bash
# Set alias to external command
alias fin='command fd'
bash
# List all bindings
bindkey