ephemeral/dotfiles/.zshrc
2024-11-27 12:14:14 +01:00

41 lines
No EOL
1.3 KiB
Bash

if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
# Set the directory we want to store zinit and plugins
ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git"
# Download Zinit, if it's not there yet
if [ ! -d "$ZINIT_HOME" ]; then
mkdir -p "$(dirname $ZINIT_HOME)"
git clone https://github.com/zdharma-continuum/zinit.git "$ZINIT_HOME"
fi
# Source/Load zinit
source "${ZINIT_HOME}/zinit.zsh"
# Add in zsh plugins
zinit light zsh-users/zsh-syntax-highlighting
zinit light zsh-users/zsh-completions
zinit light zsh-users/zsh-autosuggestions
zinit light unixorn/fzf-zsh-plugin
zinit ice depth=1; zinit light romkatv/powerlevel10k
zinit snippet OMZL::key-bindings.zsh
alias ls='exa'
alias la='exa -la'
alias dtree="exa --long --header --git --tree -L 3 -I node_modules"
alias tree="exa -T --git-ignore -I node_modules"
alias cd="z"
alias glog="git log --graph --pretty=format:'%Cred%h%Creset %an: %s - %Creset %C(yellow)%d%Creset %Cgreen(%cr)%Creset' --abbrev-commit --date=relative"
alias cat="bat"
alias status='git status'
alias commit='git commit -am'
alias push='git push'
alias force='git push --force'
alias pull='git pull'
alias add='git add'
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh