From 2e8a4d31d37ecb534e81b250110846bd33dfa54c Mon Sep 17 00:00:00 2001 From: reonokiy Date: Tue, 10 Sep 2024 19:52:32 +0800 Subject: [PATCH] update fpath for brew and format --- dot_zshrc.tmpl | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/dot_zshrc.tmpl b/dot_zshrc.tmpl index c0ee85b..eb71777 100644 --- a/dot_zshrc.tmpl +++ b/dot_zshrc.tmpl @@ -71,6 +71,11 @@ path+=('/user/local/bin') # export to sub-processes (make it inherited by child processes) export PATH +# fpath +if [[ -d "/home/linuxbrew/.linuxbrew/share/zsh/site-functions" ]]; then + fpath=(/home/linuxbrew/.linuxbrew/share/zsh/site-functions $fpath) +fi + # homebrew config eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)" @@ -138,21 +143,24 @@ if command -v pyenv &> /dev/null; then fi # nix config -if [ -e $HOME/.nix-profile/etc/profile.d/nix.sh ]; then . $HOME/.nix-profile/etc/profile.d/nix.sh; fi # added by Nix installer +if [ -e $HOME/.nix-profile/etc/profile.d/nix.sh ]; then + . $HOME/.nix-profile/etc/profile.d/nix.sh; +fi # editors -export EDITOR="nano" +export EDITOR="nvim" export VISUAL="code" # custome alias -# alias code=code-insiders -alias ..='cd ..' -alias ...='cd ../..' -alias ls=eza -alias tree='eza --tree' +if command -v eza &> /dev/null; then + alias ls=eza + alias tree='eza --tree' +fi +if command -v bat &> /dev/null; then + alias cat=bat +fi alias f=fuck alias v=nvim -alias sops='op run --no-masking -- sops' alias dotfiles='chezmoi' alias ze='zellij'