dotfiles/.zshrc

59 lines
1.8 KiB
Bash
Raw Normal View History

2018-02-01 22:34:24 +00:00
# load modules
2019-01-11 20:10:03 +00:00
bgnotify_threshold=0
for i in ~/.zsh/*/*.zsh; do
source "$i"
done
2019-01-11 19:59:58 +00:00
2019-01-11 20:10:03 +00:00
source ~/.zsh/omz/oh-my-zsh/lib/spectrum.zsh
source ~/.zsh/omz/oh-my-zsh/plugins/ssh-agent/ssh-agent.plugin.zsh
2019-01-11 19:59:58 +00:00
2019-05-26 15:03:46 +00:00
# vi key bindings
set -o vi
2018-02-01 22:34:24 +00:00
zstyle ':completion:*' completer _expand _complete _ignored _correct _approximate
zstyle ':completion:*' matcher-list 'm:{[:lower:][:upper:]}={[:upper:][:lower:]}' 'r:|[._-]=** r:|=**'
zstyle ':completion:*' max-errors 2
zstyle ':completion:*' menu select=1
2019-06-26 21:59:48 +00:00
zstyle ':completion:*' select-prompt %SScrolling active: current selection at %p%s zstyle :compinstall filename "${HOME}/.zshrc" zstyle ':completion:*' rehash true
2018-02-01 22:34:24 +00:00
2018-05-19 17:39:06 +00:00
[[ $UID -eq 0 ]] || () {
local i
local -T SUDO_PATH sudo_path
local -U sudo_path
sudo_path=($path {,/usr{,/local}}/sbin(N-/))
for i in sudo{,x} su{,x}
do zstyle ":completion:*:$i:*" environ PATH="$SUDO_PATH"
done
}
2018-12-29 18:14:14 +00:00
autoload -Uz compinit && compinit
2018-05-19 17:39:06 +00:00
zstyle ':completion::complete:*' use-cache 1
2018-02-01 22:34:24 +00:00
HISTFILE=~/.histfile
HISTSIZE=10000
SAVEHIST=10000
setopt appendhistory autocd notify
unsetopt beep
bindkey -e
2018-12-29 18:14:14 +00:00
# Prompt
autoload -U colors && colors
PROMPT="%B%{$FG[081]%}%n%{$reset_color%}%b%{$FG[245]%}@%{$reset_color%}%B%{$FG[206]%}%m%{$reset_color%}%b %{$fg[245]%}%B%c%b %(!.%{$FG[001]%}#.%{$FG[081]%}$)%{$reset_color%} "
2019-06-26 21:59:48 +00:00
export FZF_DEFAULT_OPTS="-m --no-mouse"
export FZF_DEFAULT_COMMAND="find . -type f | sed 's|^\./||'"
2018-02-02 16:12:44 +00:00
alias dots="git --git-dir=$HOME/.dots --work-tree=$HOME"
2019-06-26 21:59:48 +00:00
alias dotmodules="dots submodule update --recursive --remote"
alias venv="source ~/.venv/bin/activate"
2018-09-10 10:25:43 +00:00
alias top="htop"
2018-12-02 14:34:01 +00:00
alias ytdl="youtube-dl"
alias vi="nvim"
alias vim="nvim"
alias s="vim ~/.local/bin/\$(stest -lx ~/.local/bin | fzf --tac -e)"
[ -f ~/.zshrc.local ] && . ~/.zshrc.local
2019-06-23 16:49:02 +00:00
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh