I chose Zsh over fish because of its large community, plugins, themes and widgets (also because of past knowledge). However, I have found Zsh code to be a bit hacky as it always has been. I may consider Fish in the future or a shell like nushell if it makes things like that easier.
Note
This document is a note for my future self. Confirm that the purpose of this shell still makes sense in the functions it provides and its ux.
fzf1
ctrl+t
. Paste the selected file path(s) into the command line.alt+c
.cd
into the selected directory.ctrl+r
. Paste the selected command from history into the command line.kill -9 **<TAB>
. List all processes for select and kill.
zoxide2
cd
. Full replacement of shell cd builtin command.cdi
. Open interactive selection (fzf).cd foo<SPACE><TAB>
. Interactive completions (fzf).cd foo<TAB>
. Interactive selection (fzf) or auto-completion.
fzf-tab3
It will show zsh completions using fzf
when pressing tab. It must be the last
plugin to bin ^I
in order to keep the
compatibility
with others. You can use bindkey -M main | grep 'fzf-tab-complete'
to check that it is properly seated.
ctrl+space
. Multi-selection infzf
.
fzf-git4
Provides a lot of fzf function bindings for git repositories.
navi5
ctrl+g
. Find string in Navi cheat sheets. Replace with the snippet.
# .zshrc
zmodload zsh/zprof # first line
zprof # end
# how much time takes to load all configs?
for i in {1..10}; do time zsh -i -c exit; done
#zsh -i -c exit 0.04s user 0.02s system 99% cpu 0.054 total
#...
# https://github.com/sharkdp/hyperfine
hyperfine --warmup 1 'zsh -i -c exit'
hyperfine --warmup 2 'fish -i -c exit' 'zsh -i -c exit'
- zsh-users/zsh-completions-howto
- zsh docs/20.6 utility functions
- apple/zsh-completions
- ohmyzsh/plguins/completions. Plugins includes missing completions for known tools.
- zsh-more-completions