Compare commits
4 Commits
3734e7f232
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 254fc3062c | |||
| 1b8218f193 | |||
| 3343658120 | |||
| 7fc93e8351 |
8
zshrc
8
zshrc
@@ -14,7 +14,7 @@ bindkey '^P' history-beginning-search-backward
|
||||
bindkey '^N' history-beginning-search-forward
|
||||
|
||||
# List of non-alphanumeric characters considered part of a word
|
||||
export WORDCHARS='*?_-.[]~=&;!#$%^(){}<>'
|
||||
WORDCHARS='*?_-.[]~=&;!#$%^(){}<>'
|
||||
|
||||
# Do not create a history file for less
|
||||
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
|
||||
setopt HIST_SAVE_NO_DUPS
|
||||
|
||||
# Enable vcs_info
|
||||
# parameter expansion, command substitution and arithmetic expansion are performed in prompts
|
||||
setopt PROMPT_SUBST
|
||||
|
||||
# Comfortable aliases
|
||||
@@ -91,7 +91,7 @@ alias less='less --line-numbers'
|
||||
alias cdt='builtin cd "$(mktemp -d)"'
|
||||
|
||||
# Defines the prompt
|
||||
precmd() {
|
||||
precmd_define_prompt() {
|
||||
vcs_info
|
||||
|
||||
# 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 '
|
||||
fi
|
||||
}
|
||||
typeset -ga precmd_functions
|
||||
precmd_functions+=precmd_define_prompt
|
||||
|
||||
# include reading files from directory
|
||||
source "${HOME}"/.zsh/*
|
||||
|
||||
Reference in New Issue
Block a user