blob: caa2f0c3068680233d47f372cc5f0a9ab3255f97 (
plain)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
# -*- 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 pm 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 cdr='cd $(git root)'
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 vim -t'
alias et='emacsclient -a vim -c -n'
alias ffmpeg='ffmpeg -hide_banner'
alias ffprobe='ffprobe -hide_banner'
alias grep='grep --color=auto'
alias k=kubectl
alias kill-emacs-server='emacsclient -e "(save-buffers-kill-emacs)"'
alias la='ls -A'
alias ll='ls -hl'
alias lla='ls -Ahl'
alias mv='mv -i'
alias pgrep='pgrep -fl'
alias pm=' pm'
alias rm='rm -i'
alias s=swift
alias senv='env | sort'
alias spm='swift package'
bindkey -e
if [[ -S ${XDG_RUNTIME_DIR}/emacs/server ]]; then
export EDITOR='emacsclient -t'
else
export EDITOR=vim
fi
export LESSHISTFILE=${XDG_CACHE_HOME}/less_history
export PYTHONSTARTUP=$(dotfiles_root)/python/rc
export SQLITE_HISTORY=${XDG_CACHE_HOME}/sqlite_history
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
source_if_exists zsh/rc
compinit -d ${XDG_CACHE_HOME}/zsh/compdump
|