zsh - Extending functionality

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: ...

May 19, 2026 · 2 min · 216 words · Björn Sjöberg

zsh - Autoloading functions

I figured it would be fun to convert some of my scripts into zsh functions. Who knows, one might learn a thing or two. I decided to store my functions in $HOME/bin/functions, and therefor added the below settings to $HOME/.zshrc: export fpath=($HOME/bin/functions /usr/local/share/zsh/site-functions $fpath) autoload -Uz $HOME/bin/functions/*(.:t)

May 14, 2026 · 1 min · 47 words · Björn Sjöberg