cleanup zsh confs

This commit is contained in:
Daylin Morgan 2023-08-16 15:21:40 -05:00
parent aac817153a
commit 9cd61c05f7
Signed by: daylin
GPG key ID: C1E52E7DD81DF79F
2 changed files with 2 additions and 32 deletions

View file

@ -1,23 +1,13 @@
#!/usr/bin/env zsh
#
# .zshenv - Zsh environment file, loaded always.
#
# NOTE: .zshenv has to live at ~/.zshenv, not in $ZDOTDIR! You can get around this by
# symlinking .zshenv from your $ZDOTDIR: `ln -sf $ZDOTDIR/.zshenv ~/.zshenv`
#
#
# ZDOTDIR
#
export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-${HOME}/.config}
export ZDOTDIR=${ZDOTDIR:-${XDG_CONFIG_HOME}/zsh}
export DOTFILES_DIR=${DOTFILES_DIR:-${HOME}/.dotfiles}
#
# .zprofile
#
# We use .zprofile for everything else (load for non-login, non-interactive shells).
if [[ ( "$SHLVL" -eq 1 && ! -o LOGIN ) && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then
source "${ZDOTDIR:-$HOME}/.zprofile"

View file

@ -1,10 +1,4 @@
#
# .zprofile - Zsh file loaded on login.
#
#
# XDG
#
#!/usr/bin/env zsh
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-$HOME/.config}
@ -17,12 +11,8 @@ 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
typeset -gU path fpath cdpath
# Set the list of directories that zsh searches for commands.
path=(
@ -42,18 +32,8 @@ for rcfile in $ZDOTDIR/.extras/{current,shared}/*.{,z}sh(N); do
source $rcfile
done
#
# Less
#
# Set default less options.
export LESS="${LESS:--g -i -M -R -S -w -z-4}"
#
# Misc
#
# Use `< file` to quickly view the contents of any file.
[[ -z "$READNULLCMD" ]] || READNULLCMD=$PAGER
# vim: ft=zsh sw=2 ts=2 et