# -*- mode: shell-script -*- () { local dir for dir ( $(dotfiles_root)/zsh/functions $(dotfiles_root)/dotfiles-{${UNAME},${DOMAIN},${HOST}}/zsh/functions ); do [[ -d ${dir} ]] && fpath=(${dir} ${fpath}) done } autoload -Uz compinit op-ssh-add zmv [[ ! -d ${XDG_CACHE_HOME}/zsh ]] && mkdir -p ${XDG_CACHE_HOME}/zsh zstyle ':completion:*' cache-path ${XDG_CACHE_HOME}/zsh/cache zstyle ':completion:*' completer _expand _complete _ignored _correct _approximate zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' zstyle ':completion:*' use-cache on zstyle ':completion:*' users root ${USER} HISTFILE=${XDG_CACHE_HOME}/zsh/history HISTSIZE=65535 PS1='%(?..%F{#ff0000}%?%f )%n@%m:%~ %# ' SAVEHIST=${HISTSIZE} WORDCHARS=${WORDCHARS/\//} alias bc='bc -lq' alias cp='cp -i' alias ddig='dig +noall +answer' alias dfl='df -l' alias du='du -h' alias dusum='du -d1 | sort -hr' alias ec='emacsclient -a "" -t' alias et='emacsclient -a "" -c -n' alias ffmpeg='ffmpeg -hide_banner' alias ffprobe='ffprobe -hide_banner' alias grep='grep --color=auto' alias k=kubectl alias la='ls -A' alias ll='ls -hl' alias lla='ls -Ahl' alias mv='mv -i' alias senv='env | sort' bindkey -e bindkey '^F' history-incremental-search-forward bindkey '^R' history-incremental-search-backward export EDITOR=vim export LESSHISTFILE=${XDG_CACHE_HOME}/less_history export PYTHONSTARTUP=$(dotfiles_root)/python/rc export VISUAL=${EDITOR} setopt AUTO_CD setopt HIST_IGNORE_ALL_DUPS setopt HIST_IGNORE_SPACE setopt HIST_NO_STORE setopt HIST_REDUCE_BLANKS setopt INC_APPEND_HISTORY setopt SHARE_HISTORY if [[ ${TERM_PROGRAM} != iTerm.app ]]; then autoload -Uz vcs_info zstyle ':vcs_info:*' enable git zstyle ':vcs_info:*' formats '[%b]' RPROMPT='${vcs_info_msg_0_}' precmd_functions+=(vcs_info) setopt PROMPT_SUBST fi source_if_exists dotfiles-${UNAME}/zsh/rc source_if_exists dotfiles-${DOMAIN}/zsh/rc source_if_exists dotfiles-${HOST}/zsh/rc compinit -d ${XDG_CACHE_HOME}/zsh/compdump