cleanup zsh confs
This commit is contained in:
parent
aac817153a
commit
9cd61c05f7
2 changed files with 2 additions and 32 deletions
|
@ -1,23 +1,13 @@
|
||||||
#!/usr/bin/env zsh
|
#!/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
|
# 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`
|
# symlinking .zshenv from your $ZDOTDIR: `ln -sf $ZDOTDIR/.zshenv ~/.zshenv`
|
||||||
#
|
#
|
||||||
|
|
||||||
#
|
|
||||||
# ZDOTDIR
|
|
||||||
#
|
|
||||||
|
|
||||||
export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-${HOME}/.config}
|
export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-${HOME}/.config}
|
||||||
export ZDOTDIR=${ZDOTDIR:-${XDG_CONFIG_HOME}/zsh}
|
export ZDOTDIR=${ZDOTDIR:-${XDG_CONFIG_HOME}/zsh}
|
||||||
export DOTFILES_DIR=${DOTFILES_DIR:-${HOME}/.dotfiles}
|
export DOTFILES_DIR=${DOTFILES_DIR:-${HOME}/.dotfiles}
|
||||||
|
|
||||||
#
|
|
||||||
# .zprofile
|
|
||||||
#
|
|
||||||
|
|
||||||
# We use .zprofile for everything else (load for non-login, non-interactive shells).
|
# We use .zprofile for everything else (load for non-login, non-interactive shells).
|
||||||
if [[ ( "$SHLVL" -eq 1 && ! -o LOGIN ) && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then
|
if [[ ( "$SHLVL" -eq 1 && ! -o LOGIN ) && -s "${ZDOTDIR:-$HOME}/.zprofile" ]]; then
|
||||||
source "${ZDOTDIR:-$HOME}/.zprofile"
|
source "${ZDOTDIR:-$HOME}/.zprofile"
|
||||||
|
|
|
@ -1,10 +1,4 @@
|
||||||
#
|
#!/usr/bin/env zsh
|
||||||
# .zprofile - Zsh file loaded on login.
|
|
||||||
#
|
|
||||||
|
|
||||||
#
|
|
||||||
# XDG
|
|
||||||
#
|
|
||||||
|
|
||||||
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
# https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
|
||||||
export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-$HOME/.config}
|
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}
|
[[ -e ${(P)xdgdir} ]] || mkdir -p ${(P)xdgdir}
|
||||||
done
|
done
|
||||||
|
|
||||||
#
|
|
||||||
# Paths
|
|
||||||
#
|
|
||||||
|
|
||||||
# Ensure path arrays do not contain duplicates.
|
# 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.
|
# Set the list of directories that zsh searches for commands.
|
||||||
path=(
|
path=(
|
||||||
|
@ -42,18 +32,8 @@ for rcfile in $ZDOTDIR/.extras/{current,shared}/*.{,z}sh(N); do
|
||||||
source $rcfile
|
source $rcfile
|
||||||
done
|
done
|
||||||
|
|
||||||
#
|
|
||||||
# Less
|
|
||||||
#
|
|
||||||
|
|
||||||
# Set default less options.
|
# Set default less options.
|
||||||
export LESS="${LESS:--g -i -M -R -S -w -z-4}"
|
export LESS="${LESS:--g -i -M -R -S -w -z-4}"
|
||||||
|
|
||||||
#
|
|
||||||
# Misc
|
|
||||||
#
|
|
||||||
|
|
||||||
# Use `< file` to quickly view the contents of any file.
|
# Use `< file` to quickly view the contents of any file.
|
||||||
[[ -z "$READNULLCMD" ]] || READNULLCMD=$PAGER
|
[[ -z "$READNULLCMD" ]] || READNULLCMD=$PAGER
|
||||||
|
|
||||||
# vim: ft=zsh sw=2 ts=2 et
|
|
||||||
|
|
Loading…
Reference in a new issue