I might be an old fart that like it like it was. But I still decided to pimp my zsh with some useful additions, most notably git status symbols.
This is what I ended up with as a starting point.
Installed the following applications:
doas pkg install zoxide eza starship
Added below settings to $HOME/.zshrc:
alias zls='zoxide query -l |fzf'
alias ls='eza --icons -g'
alias ll='eza --icons --git -glo --color=never'
alias la='eza --icons --git -gloaa --color=never'
alias tree='eza --icons --tree'
alias grep='rg --color=auto'
compdef eza=ls
source <(fzf --zsh)
bindkey -M viins "^H" fzf-history-widget
bindkey -M vicmd "^H" fzf-history-widget
# Alt+G: fzf cd from root (think global)
fzf-cd-root-widget() {
local dir
dir=$(fd --type d . / --color=never --hidden 2>/dev/null | fzf +m)
if [[ -n "$dir" ]]; then
cd "$dir"
zle reset-prompt
fi
}
zle -N fzf-cd-root-widget
bindkey '\eg' fzf-cd-root-widget
eval "$(zoxide init zsh)"
eval "$(starship init zsh)"
And for the prompt I configured $HOME/.config/starship.toml like this:
format = " $directory$git_status$character"
add_newline = false
[directory]
format = "[$path]($style) "
style = "plain"
truncation_length = 0
truncate_to_repo = false
[character]
success_symbol = "[%](plain)"
error_symbol = "[%](plain)"
[git_status]
format = '([$all_status$ahead_behind]($style) )'
style = "plain"
staged = "●"
modified = "∗"
untracked = "…"
deleted = "×"
renamed = "→"
conflicted = "⚡"
ahead = "↑"
behind = "↓"