2023-08-16 15:21:40 -05:00
|
|
|
#!/usr/bin/env zsh
|
2023-02-17 09:26:31 -06:00
|
|
|
|
|
|
|
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
|
|
|
export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-$HOME/.config}
|
|
|
|
export XDG_CACHE_HOME=${XDG_CACHE_HOME:-$HOME/.cache}
|
|
|
|
export XDG_DATA_HOME=${XDG_DATA_HOME:-$HOME/.local/share}
|
|
|
|
export XDG_STATE_HOME=${XDG_STATE_HOME:-$HOME/.local/state}
|
|
|
|
export XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-$HOME/.xdg}
|
|
|
|
|
|
|
|
for xdgdir in XDG_{CONFIG,CACHE,DATA,STATE}_HOME XDG_RUNTIME_DIR; do
|
|
|
|
[[ -e ${(P)xdgdir} ]] || mkdir -p ${(P)xdgdir}
|
|
|
|
done
|
|
|
|
|
|
|
|
# Ensure path arrays do not contain duplicates.
|
2023-08-16 15:21:40 -05:00
|
|
|
typeset -gU path fpath cdpath
|
2023-02-17 09:26:31 -06:00
|
|
|
|
2023-11-13 01:28:16 -06:00
|
|
|
fpath=(
|
|
|
|
${ZDOTDIR:-${XDG_CONFIG_HOME:-$HOME/.config}/zsh}/completions(-/FN)
|
|
|
|
|
|
|
|
$fpath
|
|
|
|
)
|
|
|
|
|
2023-02-17 09:26:31 -06:00
|
|
|
path=(
|
2024-08-06 11:32:00 -05:00
|
|
|
$HOME/{,.local/,.dotfiles/}{,s}bin(N)
|
2023-02-23 14:30:40 -06:00
|
|
|
|
2024-11-13 15:52:20 -06:00
|
|
|
$HOME/.{go,cargo,pyenv,pixi,bun,nimble}/bin(N)
|
|
|
|
$HOME/.zig/(N)
|
2023-02-23 14:30:40 -06:00
|
|
|
|
2024-06-10 14:52:09 -05:00
|
|
|
/{opt,usr}/{,local/}{,s}bin(N)
|
2023-02-23 14:30:40 -06:00
|
|
|
|
2023-02-17 09:26:31 -06:00
|
|
|
$path
|
|
|
|
)
|
|
|
|
|
2024-01-02 13:14:20 -06:00
|
|
|
for rcfile in $ZDOTDIR/local/{current,shared}/*.{,z}sh(N); do
|
2023-02-20 14:26:36 -06:00
|
|
|
source $rcfile
|
|
|
|
done
|
|
|
|
|
2023-02-17 09:26:31 -06:00
|
|
|
export LESS="${LESS:--g -i -M -R -S -w -z-4}"
|
|
|
|
# Use `< file` to quickly view the contents of any file.
|
|
|
|
[[ -z "$READNULLCMD" ]] || READNULLCMD=$PAGER
|
|
|
|
|
2024-06-10 14:52:09 -05:00
|
|
|
# needed for omz plugin colored-man-pages
|
|
|
|
autoload colors && colors
|
|
|
|
|
2024-11-28 19:19:44 -06:00
|
|
|
autoload -Uz compinit && compinit
|