2021-12-22 23:52:52 +00:00
|
|
|
source ~/.profile
|
2021-12-23 00:14:33 +00:00
|
|
|
test -f "$HOME/.profile.$(hostname)" && source "$HOME/.profile.$(hostname)"
|
2021-12-26 20:39:57 +00:00
|
|
|
export REMOTE="${REMOTE:-true}"
|
2021-12-22 23:52:52 +00:00
|
|
|
|
|
|
|
HISTFILE=~/.histfile
|
|
|
|
HISTSIZE=100000
|
|
|
|
SAVEHIST=100000
|
|
|
|
|
|
|
|
setopt autocd extendedglob notify
|
|
|
|
bindkey -e
|
|
|
|
bindkey "^[[1;5C" forward-word
|
|
|
|
bindkey "^[[1;5D" backward-word
|
|
|
|
|
|
|
|
zmodload zsh/complist
|
|
|
|
zstyle ':completion:*' menu yes select
|
|
|
|
|
|
|
|
zstyle ':completion:*' list-dirs-first yes
|
|
|
|
zstyle ':completion:*' matcher-list '' 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
|
|
|
|
|
|
|
|
zstyle :compinstall filename ~/.zshrc
|
|
|
|
autoload -Uz compinit && compinit
|
|
|
|
|
|
|
|
autoload -Uz zcalc
|
|
|
|
|
|
|
|
autoload -Uz vcs_info
|
|
|
|
zstyle ':vcs_info:*' actionformats \
|
|
|
|
'%F{4}[%F{2}%b%F{3}|%F{1}%a%F{4}]%f '
|
|
|
|
zstyle ':vcs_info:*' formats '%F{4}%b%f '
|
|
|
|
zstyle ':vcs_info:*' enable git
|
|
|
|
precmd () { vcs_info }
|
|
|
|
|
|
|
|
setopt promptsubst
|
|
|
|
PS1='%F{5}%3~ ${vcs_info_msg_0_}%f%# '
|
|
|
|
test "$REMOTE" && PS1='%n@%m '$PS1
|
|
|
|
|
|
|
|
alias ls='ls --color=always'
|
|
|
|
alias grep='grep --color=always'
|
|
|
|
|
|
|
|
alias gitdf='git --git-dir=$HOME/.config/dotfiles/ --work-tree=$HOME'
|
|
|
|
alias ssh='TERM=xterm-256color ssh'
|
|
|
|
alias e="$EDITOR"
|
|
|
|
alias r="trash -r"
|
|
|
|
|
|
|
|
source /usr/share/fzf/key-bindings.zsh
|
2021-12-23 00:12:11 +00:00
|
|
|
source ~/.config/zsh/bg_notify.zsh
|
2021-12-24 15:10:07 +00:00
|
|
|
test ! "$REMOTE" && source ~/.config/zsh/osc_7.zsh
|
2021-12-22 23:52:52 +00:00
|
|
|
|
|
|
|
if test ! "$REMOTE"; then
|
|
|
|
unset SSH_AGENT_PID
|
|
|
|
if [ "${gnupg_SSH_AUTH_SOCK_by:-0}" -ne $$ ]; then
|
|
|
|
# Start if not started
|
|
|
|
gpg-agent --daemon 2>/dev/null
|
|
|
|
export SSH_AUTH_SOCK="$(gpgconf --list-dirs agent-ssh-socket)"
|
|
|
|
fi
|
|
|
|
fi
|