# # .zprofile - Zsh file loaded on login. # # # XDG # # 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 # # Paths # # Ensure path arrays do not contain duplicates. typeset -gU path fpath cdpath mailpath # Set the list of directories that zsh searches for commands. path=( $HOME/{go,.cargo}/bin(N) $HOME/.extra/bin(N) $HOME/{,.local/}{,s}bin(N) /opt/{homebrew,local}/{,s}bin(N) /usr/{,local/}{,s}bin(N) $path ) # start by sourcing extras for rcfile in $HOME/.extra/runcom/*; do source $rcfile done # # Less # # Set default less options. export LESS="${LESS:--g -i -M -R -S -w -z-4}" # Set the less input preprocessor. if [[ -z "$LESSOPEN" ]] && (( $#commands[(i)lesspipe(|.sh)] )); then export LESSOPEN="| /usr/bin/env $commands[(i)lesspipe(|.sh)] %s 2>&-" fi # # Misc # # Use `< file` to quickly view the contents of any file. [[ -z "$READNULLCMD" ]] || READNULLCMD=$PAGER # vim: ft=zsh sw=2 ts=2 et