summaryrefslogtreecommitdiff
path: root/dot_config/zsh/zprofile
blob: 6ba358f9c9df890d98c12d18c43fa881c8daa5da (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# -*- mode: sh -*- vim: ft=zsh
xzsource zprofile.pre

: ${PAGER:=less} ${EDITOR:=vi} \
  ${HOSTNAME:=$(uname -n)} ${USER:=$(id -un)} \
  ${HISTFILE:=~/.local/state/history/zsh}
if [ "${HISTSIZE:-30}" = 30 ]; then
	HISTSIZE=5000
	SAVEHIST=10000
fi
[ -d "${HISTFILE:h}" ] || mkdir -m 0700 "${HISTFILE:h}"
export EDITOR PAGER

if [[ -z $LS_COLORS ]]; then
	# directory, executable, file, pipe, socket
	# blockdev chardev symlink broken-link
	export -T LS_COLORS ls_colors=(
		di='1;34' ex='1;32' fi=0      pi=33     so='1;35'
		bd='1;33' cd='1;33' ln='1;36' or='1;31'
	)
fi

setopt nullglob
path=(~/bin ~/.local/share/sh ~/.local/*/bin /opt/*/bin {/usr,}{/local,}/{s,}bin)

xsource ~/.local/share/sh/xdg

xzsource zprofile.{local,post}