This is mostly in git for my benefit, but you're welcome to use it.
Non-exhaustive list:
- Uses Starship for prompt; customise to your taste
- Lots of fzf
- Lots of completions (via plugin)
- Syntax highlighting at prompt (via plugin)
- Sensible settings (IMO ;)
- Fast startup (makes use of recompilation and caching)
- Shows unattached tmux sessions at login, as I use tmux for everything
- Show
time
output for commands which took >10s to run - Stores a log of what was enabled/configured during startup
- Sets up some hashed dir names (if the targets exist)
~src
is~/src
~tmp
is~/tmp
~icloud
is iCloud Drive
- Strongly prefers neovim if it's available (else vim); sets up nvim as man page viewer
- Sets up a bunch of
ls
-type aliases toexa
if installedll
,la
for long and "all" listslg
for exa's "git" display
- Lazy-loads nvm, because it takes a million years to run the first time
- Lazy-compile completions (can cause harmless errors on shell launches after an upgrade)
Again, non-exhaustive.
t
will launch or attach a tmux session. The one used depends on the terminal size (local
orfullscreen
). I always run in a tmux session, so I just runt
as the first thing in a window, generally.rv
usesrg
to search files, then usesfzf
to let you pick one to open in vimfv
likewise usesfd
to search matching filenames, and usesfzf
to pickvenv
will activate a virtualenv in./.venv
if it exists, else offer to create it and install requirementsgita
usesfzf
to give you an interactive file-picker for committing to gittry
followed by a command will run that command with exponential backoff until it succeeds; great fortry ssh ...
after rebooting a host. Also good with history expansion:try !!
aws-profile
switches profiles from your awscli config with tab-completion;aws-region
for regions (I think the list is probably out of date ;)- There's a bunch of other aws functions in there; check out the
local-plugins/aws
stuff if they're of interest - If neovim is installed, then
vim
andvi
are aliased to it;$EDITOR
and$VISUAL
are set too. run-docker IMAGE
runs that image and gives you a bash shelltidy-docker
gets rid of cruftcat
is aliases tobat
if it's installedshow-certificate
dumps a TLS cert file with openssl
- Ctrl-r for fzf-powered shell history
- Ctrl-t for fzf-powered filename picker
- Alt-c for fzf-powered directory picker
- Alt-d for fzf-powered directory history
- Ctrl-x e to edit current command line in vim
- Alt-f to accept forward a word from the autosuggest display; right-arrow to accept the whole line
You will need (for best results):
- zsh, probably a recent one like >= 5.2 or 5.3
- a modern terminal which can do things like 256 colours (or true colours)
- one of the Nerd fonts as this uses glyphs from that
- zplugin, which installs and manages some plugins. This should work without though, but not as well
You probably want:
On macOS you can install all of those with homebrew.
- clone this repo to
~/.zsh
:git clone https://github.com/jamesoff/zsh.git ~/.zsh
- link files:
for i in .zshrc .zprofile .zshenv; do ln -s "$HOME/.zsh/$i" "$HOME/$i"; done
- when you run zsh for the first time, zplug will download and install the plugins required
You might like my tmux config and vim config to go with this.