# If not running interactively, don't do anything [[ $- != *i* ]] && return # Required init for cli programs # Do not install completions unless no working, check /usr/share/bash-completion eval "$(zoxide init zsh)" autoload -Uz promptinit autoload -Uz compinit promptinit compinit source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh bindkey '^[[H' beginning-of-line bindkey '^[[F' end-of-line bindkey "^[[3~" delete-char # Set aliases alias grep="ugrep" alias cd="z" alias cat="bat -p" alias update-mirrors="rate-mirrors arch | sudo tee /etc/pacman.d/mirrorlist; rate-mirrors chaotic-aur | sudo tee /etc/pacman.d/chaotic-mirrorlist" alias update="paru; flatpak update" function ls { if [[ "$@" =~ "-a" || "$@" =~ "-A" || "$@" =~ "--all" || "$@" =~ "--almost-all" ]]; then eza --icons --long $@ else eza --icons --long --ignore-glob "$([[ -f .hidden ]] && cat .hidden | tr '\n' '|')" $@ fi } function .re-add { chezmoi re-add chezmoi git diff if $(read -q "?Commit changes? [y/N]"); then chezmoi git commit -- -am $1 fi } # Helpful tool: https://zsh-prompt-generator.site/ # On github: https://github.com/k-yokoishi/zsh-prompt-generator PROMPT="[%n@%m %~]$ " RPROMPT="%?:%h | %*" # Starship after defining custom prompt, easy to remove eval "$(starship init zsh)"