setopt AUTO_CD CDABLE_VARS
## completion
setopt GLOB_COMPLETE
-## line
+## globbing
setopt EXTENDED_GLOB GLOB_DOTS MARK_DIRS NOMATCH NUMERIC_GLOB_SORT
-## prompt
-setopt PROMPT_SUBST
## jobs
-setopt AUTO_CONTINUE
+setopt AUTO_CONTINUE LONG_LIST_JOBS
## history
setopt NO_HIST_SAVE_BY_COPY HIST_IGNORE_DUPS SHARE_HISTORY HIST_REDUCE_BLANKS
+### imports
+autoload -Uz zmv
+autoload -Uz zmathfunc && zmathfunc
+
+### exports
+## common
+export EDITOR=vim
+export PAGER=less
+## grep
+# XXX: deprecated in GNU
+export GREP_OPTIONS=--color=auto
+## histfile
+export HISTFILE=~/.histfile
+export HISTSIZE=1000
+export SAVEHIST=1000
+## python
+export PYTHONSTARTUP=~/.pythonrc
+## wayland/sway
+# XXX: only do this if we're actually in wayland, but without a start script
+export XDG_SESSION_TYPE=wayland
+export QT_QPA_PLATFORM=wayland-egl
+export QT_WAYLAND_DISABLE_WINDOWDECORATION=-1
+export SDL_VIDEODRIVER=wayland
+export TERMINAL=footclient
+
### keys
-# TODO: investigate "^[[200~" bracketed-paste
bindkey -v
KEYTIMEOUT=10
## populate key array
if (( $#terminfo == 0 )) {
# terminfo is not set or empty
function find_keymap {
- for f in ${ZDOTDIR:-$HOME}/.zkbd/${TERM}{-${DISPLAY:-${VENDOR}-${OSTYPE}},}
+ for f in ${ZDOTDIR:-$HOME}/.zkbd/$TERM{-${DISPLAY:-$VENDOR-$OSTYPE},}
[[ -f $f ]] && keymap=$f && break
}
find_keymap
} else {
alias ll='ls -lAFh'
}
-alias p="${PAGER:-more}" # TODO: make sure more is there or use alternate
-alias e="${EDITOR:-vi}" # TODO: make sure vi is there or use alternate
+alias p=${PAGER:-more} # TODO: make sure more is there or use alternate
+alias e=${EDITOR:-vi} # TODO: make sure vi is there or use alternate
alias se=sudoedit
# be paranoid
alias cp='cp -ip'
alias rm='rm -i'
}
## py venv
-alias va="source bin/activate"
-alias vd="deactivate"
+alias va='source bin/activate'
+alias vd=deactivate
## ps
source ~/bin/.check-busybox
-if which pstree >/dev/null 2>&1 && ! check-busybox pstree; then
+if [[ -v commands[pstree] ]] && ! check-busybox pstree; then
# use pstree, but NOT busybox pstree because it kinda sucks
ps="pstree -wg3"
elif [[ "$OSTYPE" =~ '^freebsd' ]]; then
} else {
ps="$ps | \"${PAGER:-more}\""
}
-alias pa="$ps"
+alias pa=$ps
alias spa="sudo $ps"
unset ps
function up {
cd $(printf '../%.0s' {1..${1:-1}})
}
+alias u=up
## zoxide
[[ -v commands[zoxide] ]] && eval "$(zoxide init zsh)"
add-zsh-hook chpwd sev_chpwd
### system-specific configs and aliases
-case "$OSTYPE"; in
+case $OSTYPE; in
freebsd*)
# colors
export CLICOLOR=
### load site-specific
if [[ -f ~/.zshrc.local ]] { source ~/.zshrc.local }
-# vim: set et sts=4 sw=4 ts=8 tw=79 :
+# vim: et sts=4 sw=4 ts=8 tw=79