.zshrc
This commit is contained in:
parent
8123b403f4
commit
0fc7500375
1 changed files with 22 additions and 16 deletions
38
.zshrc
38
.zshrc
|
@ -1,5 +1,12 @@
|
|||
# -*- Mode: shell-script; -*-
|
||||
autoload -Uz add-zsh-hook
|
||||
autoload -Uz compinit
|
||||
autoload -U colors
|
||||
autoload -Uz vcs_info
|
||||
|
||||
# Autoload zsh functions.
|
||||
fpath=($HOME/.zsh/functions $fpath)
|
||||
autoload -U $HOME/.zsh/functions/*(:t)
|
||||
|
||||
# Setup variables
|
||||
HISTFILE=$ZDOTDIR/histfile
|
||||
|
@ -27,38 +34,34 @@ alias reboot="systemctl reboot"
|
|||
alias poweroff="systemctl poweroff"
|
||||
|
||||
setopt notify
|
||||
# Allow for functions in the prompt
|
||||
setopt PROMPT_SUBST
|
||||
setopt PROMPT_SUBST # Allow for functions in the prompt
|
||||
setopt EXTENDED_GLOB
|
||||
|
||||
zstyle :compinstall filename '$HOME/.zshrc'
|
||||
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
|
||||
# Initialize colors.
|
||||
autoload -U colors
|
||||
colors
|
||||
|
||||
# Autoload zsh functions.
|
||||
fpath=($HOME/.zsh/functions $fpath)
|
||||
autoload -U $HOME/.zsh/functions/*(:t)
|
||||
|
||||
# Enable auto-execution of functions
|
||||
typeset -ga preexec_functions
|
||||
typeset -ga precmd_functions
|
||||
typeset -ga chpwd_functions
|
||||
|
||||
# Append git functions needed for prompt.
|
||||
add-zsh-hook preexec preexec_update_vars
|
||||
add-zsh-hook precmd precmd_update_git_vars
|
||||
add-zsh-hook precmd precmd_update_updates
|
||||
add-zsh-hook precmd precmd_maybe_festival
|
||||
add-zsh-hook precmd vcs_info
|
||||
add-zsh-hook chpwd chpwd_update_git_vars
|
||||
|
||||
zstyle ':vcs_info:*' actionformats '%F{2}(%f%s %r %b%F{2})%f %a
|
||||
%S'
|
||||
zstyle ':vcs_info:*' enable bzr git hg svn
|
||||
zstyle ':vcs_info:*' formats '%F{2}(%f%s %r %b%F{2})%f
|
||||
%S'
|
||||
zstyle ':vcs_info:*' nvcsformats '
|
||||
%~'
|
||||
zstyle ':vcs_info:bzr:*' branchformat '%b'
|
||||
|
||||
# Set the prompt.
|
||||
PROMPT='$(prompt)'
|
||||
RPROMPT='$(rprompt)'
|
||||
PROMPT='%F{1}(%F{2}(%f%m %l%F{2})%f ${vcs_info_msg_0_}%F{1})%f %# '
|
||||
|
||||
# Set terminal name to current running application
|
||||
case $TERM in
|
||||
|
@ -100,3 +103,6 @@ if [ -z $EMACS ]; then
|
|||
ZSH_HIGHLIGHT_STYLES[double-hyphen-option]='fg=blue'
|
||||
ZSH_HIGHLIGHT_STYLES[single-hyphen-option]='fg=blue'
|
||||
fi
|
||||
|
||||
compinit
|
||||
colors # Initialize colors.
|
||||
|
|
Loading…
Reference in a new issue