Compare commits

..

4 Commits

8
zshrc
View File

@@ -14,7 +14,7 @@ bindkey '^P' history-beginning-search-backward
bindkey '^N' history-beginning-search-forward bindkey '^N' history-beginning-search-forward
# List of non-alphanumeric characters considered part of a word # List of non-alphanumeric characters considered part of a word
export WORDCHARS='*?_-.[]~=&;!#$%^(){}<>' WORDCHARS='*?_-.[]~=&;!#$%^(){}<>'
# Do not create a history file for less # Do not create a history file for less
export LESSHISTFILE=/dev/null export LESSHISTFILE=/dev/null
@@ -68,7 +68,7 @@ setopt HIST_IGNORE_SPACE
# When writing out the history file, older commands that duplicate newer ones are omitted # When writing out the history file, older commands that duplicate newer ones are omitted
setopt HIST_SAVE_NO_DUPS setopt HIST_SAVE_NO_DUPS
# Enable vcs_info # parameter expansion, command substitution and arithmetic expansion are performed in prompts
setopt PROMPT_SUBST setopt PROMPT_SUBST
# Comfortable aliases # Comfortable aliases
@@ -91,7 +91,7 @@ alias less='less --line-numbers'
alias cdt='builtin cd "$(mktemp -d)"' alias cdt='builtin cd "$(mktemp -d)"'
# Defines the prompt # Defines the prompt
precmd() { precmd_define_prompt() {
vcs_info vcs_info
# check if vcs_info_msg_0_ is empty to avoid an anoying space in the prompt # check if vcs_info_msg_0_ is empty to avoid an anoying space in the prompt
@@ -101,6 +101,8 @@ precmd() {
PS1='%B%K{white}%F{black}%(3~|…/%1~|%~)%k%f %F{green}${vcs_info_msg_0_}%f %%%b ' PS1='%B%K{white}%F{black}%(3~|…/%1~|%~)%k%f %F{green}${vcs_info_msg_0_}%f %%%b '
fi fi
} }
typeset -ga precmd_functions
precmd_functions+=precmd_define_prompt
# include reading files from directory # include reading files from directory
source "${HOME}"/.zsh/* source "${HOME}"/.zsh/*