summaryrefslogtreecommitdiff
path: root/.zshrc
diff options
context:
space:
mode:
authorWarrick Lo <warrick.s.z.lo@gmail.com>2021-12-11 23:33:16 -0800
committerWarrick Lo <warrick.s.z.lo@gmail.com>2021-12-11 23:33:16 -0800
commit487d64163c59fa3de79b5ff1abf303475395c4a2 (patch)
tree6339b3c8bbf7bdfe10e8c006c9cfbae9f66f527e /.zshrc
parent88de5bcf9b1598c5ada352d1f3b724423bf7e6ad (diff)
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.
Diffstat (limited to '.zshrc')
-rw-r--r--.zshrc11
1 files changed, 6 insertions, 5 deletions
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"