combine mac+linux .zshrc to improve portability

This commit is contained in:
2024-10-26 07:33:21 -04:00
parent d87a1ccbd3
commit a7d728b695
+37 -12
View File
@@ -5,7 +5,7 @@ if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi fi
export PATH=$PATH:~/bin:~/.local/bin export PATH="$PATH:$HOME/bin:$HOME/.local/bin"
export ZSH="$HOME/.oh-my-zsh" export ZSH="$HOME/.oh-my-zsh"
export EDITOR='nvim' export EDITOR='nvim'
export GPG_TTY=$(tty) export GPG_TTY=$(tty)
@@ -19,26 +19,50 @@ HIST_STAMPS="yyyy-mm-dd"
HISTSIZE=100000 HISTSIZE=100000
plugins=( plugins=(
zsh-autosuggestions
zsh-syntax-highlighting
last-working-dir
zsh-vi-mode
fzf-zsh-plugin
sudo
aliases
alias-finder alias-finder
aliases
ansible
battery
colored-man-pages colored-man-pages
command-not-found
dircycle dircycle
dirhistory dirhistory
zoxide docker
docker-compose
dotenv dotenv
fzf-zsh-plugin
genpass genpass
history git
web-search
command-not-found
git-prompt git-prompt
history
last-working-dir
ssh
ssh-agent
sudo
tmux
vscode
web-search
zoxide
zsh-autosuggestions
zsh-syntax-highlighting
zsh-vi-mode
) )
if [[ "$OSTYPE" =~ ^darwin ]]; then
plugins+=(
brew
copypath
macos
)
fi
if [[ "$OSTYPE" =~ ^linux ]]; then
plugins+-(
archlinux
ubuntu
)
fi
# Fix ctrl+r # Fix ctrl+r
source $HOME/.oh-my-zsh/custom/plugins/zsh-vi-mode/zsh-vi-mode.plugin.zsh source $HOME/.oh-my-zsh/custom/plugins/zsh-vi-mode/zsh-vi-mode.plugin.zsh
zvm_after_init_commands+=('[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh') zvm_after_init_commands+=('[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh')
@@ -47,6 +71,7 @@ zvm_after_init_commands+=('[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh')
ZSH_ALIAS_FINDER_AUTOMATIC=true ZSH_ALIAS_FINDER_AUTOMATIC=true
source $ZSH/oh-my-zsh.sh source $ZSH/oh-my-zsh.sh
#eval "$(starship init zsh)"
#eval "$(zoxide init zsh)" #eval "$(zoxide init zsh)"
# To customize prompt, run `p10k configure` or edit ~/.p10k.zsh. # To customize prompt, run `p10k configure` or edit ~/.p10k.zsh.