2023-10-19 22:24:04 +02:00
|
|
|
typeset -U path cdpath fpath manpath
|
|
|
|
|
|
|
|
path+="$HOME/.zsh/plugins/cmdtime"
|
|
|
|
fpath+="$HOME/.zsh/plugins/cmdtime"
|
|
|
|
|
|
|
|
plugins=(dirhistory git screen)
|
|
|
|
ZSH_CUSTOM="$HOME/.oh-my-zsh"
|
|
|
|
ZSH_THEME="tdpeuter"
|
2024-03-24 11:50:01 +01:00
|
|
|
# Disable automatically updating
|
|
|
|
zstyle ':omz:update' mode disabled
|
2023-10-19 23:02:17 +02:00
|
|
|
source $ZSH_CUSTOM/oh-my-zsh.sh
|
2023-10-19 22:24:04 +02:00
|
|
|
|
|
|
|
if [[ -f "$HOME/.zsh/plugins/cmdtime/cmdtime.plugin.zsh" ]]; then
|
|
|
|
source "$HOME/.zsh/plugins/cmdtime/cmdtime.plugin.zsh"
|
|
|
|
fi
|
|
|
|
if [[ -f "$HOME/.zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh" ]]; then
|
|
|
|
source "$HOME/.zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh"
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [[ -f "$HOME/.zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" ]]; then
|
|
|
|
source "$HOME/.zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# History options should be set in .zshrc and after oh-my-zsh sourcing.
|
|
|
|
# See https://github.com/nix-community/home-manager/issues/177.
|
|
|
|
HISTSIZE="10000"
|
|
|
|
SAVEHIST="10000"
|
|
|
|
|
|
|
|
HISTFILE="$HOME/.zsh_history"
|
|
|
|
mkdir -p "$(dirname "$HISTFILE")"
|
|
|
|
|
|
|
|
setopt HIST_FCNTL_LOCK
|
|
|
|
setopt HIST_IGNORE_DUPS
|
|
|
|
setopt HIST_IGNORE_SPACE
|
|
|
|
setopt HIST_EXPIRE_DUPS_FIRST
|
|
|
|
setopt SHARE_HISTORY
|
|
|
|
setopt EXTENDED_HISTORY
|
|
|
|
|
|
|
|
# Add direnv
|
|
|
|
if [ -x "$(command -v direnv)" ]; then
|
|
|
|
eval "$(direnv hook zsh)"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Add fzf
|
|
|
|
if [ -x "$(command -v fzf-share)" ]; then
|
|
|
|
source "$(fzf-share)/key-bindings.zsh"
|
|
|
|
source "$(fzf-share)/completion.zsh"
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Aliases
|
|
|
|
alias cp='cp -i'
|
|
|
|
alias df='df -h'
|
|
|
|
alias free='free -m'
|
|
|
|
alias gs='git status'
|
|
|
|
alias hgrep='history | grep'
|
|
|
|
alias ll='ls -la'
|
2024-09-19 15:30:17 +02:00
|
|
|
alias mkdir='mkdir -pv'
|
2023-10-19 22:24:04 +02:00
|
|
|
alias more='less'
|
2024-09-19 15:30:17 +02:00
|
|
|
alias mv='mv -i'
|
2023-10-19 22:24:04 +02:00
|
|
|
alias np='nano -w PKGBUILD'
|
2024-09-19 15:30:17 +02:00
|
|
|
alias rm='rm -I --preserve-root'
|
|
|
|
alias zip='zip -r'
|
2023-10-19 22:24:04 +02:00
|
|
|
alias update='pushd ~/projects/sisyphus/nixos
|
|
|
|
nix flake update
|
|
|
|
sudo nixos-rebuild switch --flake .# --show-trace
|
|
|
|
popd
|
|
|
|
'
|
|
|
|
|
|
|
|
# -- Barrier --
|
|
|
|
|
|
|
|
for profile in ${(z)NIX_PROFILES}; do
|
|
|
|
fpath+=($profile/share/zsh/site-functions $profile/share/zsh/$ZSH_VERSION/functions $profile/share/zsh/vendor-completions)
|
|
|
|
done
|
|
|
|
|