From 487d64163c59fa3de79b5ff1abf303475395c4a2 Mon Sep 17 00:00:00 2001 From: Warrick Lo Date: Sat, 11 Dec 2021 23:33:16 -0800 Subject: Restructure entire home directory The new XDG base directories will resemble the Filesystem Hierarchy Standard on Linux or the FreeBSD/OpenBSD directory structure. Refer to the FHS or hier(7). XDG user directories are defined in $XDG_CONFIG_HOME/user-dirs.dirs. --- .zshrc | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to '.zshrc') diff --git a/.zshrc b/.zshrc index 58e79a7..1c4a224 100644 --- a/.zshrc +++ b/.zshrc @@ -11,12 +11,13 @@ PS1="%F{3}[%n@%m %~]%f %(?..%B%F{9}%?%f%b )%(!.#.$) " setopt hist_ignore_dups SAVEHIST=100000 HISTSIZE=100000 -HISTFILE="$HOME/.cache/zsh/history" +HISTFILE="$XDG_CACHE_HOME/zsh/history" # Enable tab completion. autoload -U compinit zstyle ":completion:*" menu select zmodload zsh/complist +compinit -d "$XDG_CACHE_HOME/zsh/zcompdump" # Do not ask before executing 'rm *' or 'rm path/*'. setopt rm_star_silent @@ -28,14 +29,14 @@ bindkey -v "^?" backward-delete-char export GPG_TTY="$(tty)" # Load aliases. -if [ -f "$HOME/.config/aliasrc" ]; then - source "$HOME/.config/aliasrc" +if [ -f "$XDG_CONFIG_HOME/aliasrc" ]; then + source "$XDG_CONFIG_HOME/aliasrc" fi # Load Zsh scripts. -autosuggestions="$HOME/.local/share/zsh/autosuggestions/zsh-autosuggestions.zsh" -syntax_highlight="$HOME/.local/share/zsh/syntax-highlighting/zsh-syntax-highlighting.zsh" +autosuggestions="$XDG_DATA_HOME/zsh/autosuggestions/zsh-autosuggestions.zsh" +syntax_highlight="$XDG_DATA_HOME/zsh/syntax-highlighting/zsh-syntax-highlighting.zsh" if [ -f "$autosuggestions" ]; then source "$autosuggestions" -- cgit v1.2.3