forked from L-P/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.zshrc
36 lines (29 loc) · 1020 Bytes
/
.zshrc
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
# Oh-my-ZSH
ZSH=$HOME/.oh-my-zsh
DISABLE_AUTO_UPDATE="true"
plugins=(vi-mode tmux urltools vagrant)
source $ZSH/oh-my-zsh.sh
# Autojump
source ~/.autojump/bin/autojump.zsh
autoload -U compinit && compinit -u
# Misc options
bindkey '^R' history-incremental-search-backward
# Bind ^Z to fg, allowing to cycle in and out of apps quickly.
function rebind-z() { fg }
zle -N rebind-z
bindkey '^Z' rebind-z
SAVEHIST=1000000
setopt inc_append_history complete_aliases
# Awe-inspiring prompt
local cmdstatus="[%!:%j:%(?.%{$fg[green]%}.%{$fg[red]%})%B%?%b]"
local userat="%{$fg[green]%}%B%(!.%{$fg[red]%}.%{$fg[green]%})%B@%{$fg[green]%}%m%b"
local pwd=":%B%{$fg[blue]%}%c%b"
local userchar="%(!.#.$)"
PROMPT='${cmdstatus}${userat}${pwd}$(git_prompt_info)${userchar} '
# Taken from the candy theme.
ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[green]%}["
ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}"
ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}*%{$fg[green]%}"
ZSH_THEME_GIT_PROMPT_CLEAN=""
source ~/.commonshrc
source ~/.zsh_local