Reference
Shortcuts, aliases and plugins
Everything you can type once the dotfiles are installed. The full story, including why each choice was made, is in the README.
Keyboard shortcuts
- Ctrl-R
- Search history with Atuin. Press
Ctrl-Ragain to switch between all history, this machine, this session, and this folder. - ↑ / ↓
- Search history for commands starting with what you’ve typed (
history-substring-search). - Tab
- Completion menu you can fuzzy-search (fzf-tab).
- Ctrl-T
- Pick a file with fzf and insert its path.
- Esc then C
- Pick a folder with fzf and
cdinto it (Option-Cif your terminal sends Option as Alt). - Esc Esc
- Re-run the current or previous command with
sudo(sudo). - Ctrl-O
- Copy what you’ve typed to the clipboard without running it (
copybuffer). - Enter
- On an empty prompt: run
gst -u .(git status) in a repo,ls -lhelsewhere (magic-enter). - Option-← / →
- Back / forward through folders you’ve visited (
dirhistory). - Option-↑ / ↓
- Go to the parent folder / into the first subfolder.
- Ctrl-← / →
- Jump one word back / forward.
- ...
- Typing dots expands them:
...→../..(smartdots).
Aliases
Defined in lib/aliases.zsh, on top of the Oh My Zsh aliases. Depending on installed tools, ls uses eza, cat uses bat, cd uses zoxide, and top uses btop. rm, cp and mv ask before deleting or overwriting (common-aliases).
Folder shortcuts
- dl
cd ~/Downloads- dt
cd ~/Desktop- pj
cd ~/Projects- pjr
cd ~/Projects/Repos- pjf
cd ~/Projects/Forks- pjj
cd ~/Projects/Job- pjl
cd ~/Projects/Playground
Commands
- e
- Open in
$EDITORwithout waiting (VS Code). - +x / x+
chmod +x- reload
- Reload
~/.zshrc. - clr
clear- q
- Go home and clear the screen.
- open / o <file>
- Open a file from the terminal.
- oo
- Open the current folder.
- term
- Open iTerm.
macOS
Misc
- update
- Update dotfiles, Zsh plugins, brew, mise runtimes and apt packages (
scripts/update.sh). - bootstrap
- Run the machine bootstrap (
scripts/bootstrap.sh). - dotfiles
- Jump into the dotfiles folder.
- myip
- My local IP address.
- password
- Generate a random password, copy it and print it.
- path
- Print
$PATHone entry per line. - getpage
- Download a web page with all its assets.
- get
- Download a file with its original filename.
- git-root / cdgr
- Jump to the current repo root.
- mkd <dir>
- Create a folder and
cdinto it. - extract <file>
- Unpack any archive (
extract).
Tools (only when installed)
Git aliases
Set in home/.gitconfig. Your name, email and machine-specific settings go in ~/.gitlocal. Diffs use delta, pulls rebase, and new branches push to a same-named remote branch.
- git a / ap
git add/git add -p- git ua
git reset HEAD: unstage files.- git b
git branch- git c / cm / ca / cam
git commit, with-m,-aor-am.- git co / cb
git checkout/git checkout -b- git sw / swc
git switch/git switch -c- git m / mc
git merge/git merge --continue- git s
git status -sb- git main / master / develop
- Go to that branch and pull.
- git memain / memaster
- Fetch
main/masterand merge it into the current branch. - git remain / remaster
- Fetch
main/masterand rebase onto it (with autostash). - git l / ll
- One-line log / log with changed files.
- git ignore
- Append files to
.gitignore. - git this
- Init, add everything and commit.
- git amend / redo
- Amend the last commit / keeping its message.
- git undo
reset --mixed HEAD^- git discard
checkout --- git contrib
- Contributors and their commit counts.
- git today
- Lines of code you’ve written today.
- git sync
- Pull, then push.
- git lazy
- Open
lazygit. - git git
- Don’t complain about
git git.
Bin
Small scripts in bin/, on your PATH.
- brew-usage
- List Homebrew formulae and apps by when you last used them, to spot ones to remove.
- emptytrash
- Empty the Trash on all mounted volumes.
- git-cleanup [--force]
- Remove old Git branches.
- git-fork <author>
- Add an
upstreamremote. - git-upstream [branch]
- Sync a branch with upstream (defaults to
master). - gz <file>
- Get a file’s gzipped size.
- n <cmd>
- Run a binary from the project’s
node_modules/.bin. - nyan
- Print nyan cat.
- password
- Generate a random password and copy it.
Zsh plugins
Loaded with zgenom from home/.zshrc.
Oh My Zsh
- Git & GitHub
git,git-commit,gh- History & navigation
history-substring-search,fzf,zoxide,dirhistory- Containers & terminal
docker,docker-compose,tmux- Helpers
sudo,extract,copypath,copyfile,copybuffer,magic-enter,aliases,common-aliases,command-not-found,tldr,macos,vscode
Other
- Starship
- The prompt, configured in
config/starship. - fast-syntax-highlighting
- Commands are coloured as you type; typos turn red.
- zsh-autosuggestions
- Fish-like suggestions from history.
- fzf-tab
- Fuzzy
Tabcompletion, plus zsh-completions. - zsh-you-should-use
- Reminds you when an alias exists for what you typed.
- zsh-autopair
- Closes quotes and brackets.
- omz-plugin-pnpm
- pnpm aliases (
p,pa,pr,pd…) andPNPM_HOMEonPATH. - tinted-shell
- base16 terminal colour schemes.