ref .zshrc

This commit is contained in:
TheK4n 2022-01-07 05:11:54 +03:00
parent 1551373a1e
commit f0d635c121
6 changed files with 33 additions and 24 deletions

13
.subzsh/history Normal file
View File

@ -0,0 +1,13 @@
# History configurations
export HISTFILE=~/.zsh_history
export HISTSIZE=1000
export SAVEHIST=2000
setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE
setopt hist_ignore_dups # ignore duplicated commands history list
setopt hist_ignore_space # ignore commands that start with space
setopt hist_verify # show command with history expansion to user before running it
#setopt share_history # share command history data
# configure `time` format
TIMEFMT=$'\nreal\t%E\nuser\t%U\nsys\t%S\ncpu\t%P'

View File

@ -25,13 +25,3 @@ bindkey '^[[6~' end-of-buffer-or-history # page down
bindkey '^[[H' beginning-of-line # home
bindkey '^[[F' end-of-line # end
bindkey '^[[Z' undo # shift + tab undo last action
# configure `time` format
TIMEFMT=$'\nreal\t%E\nuser\t%U\nsys\t%S\ncpu\t%P'
# enable auto-suggestions based on the history
if [ -f /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh ]; then
. /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh
# change suggestion color
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=#999'
fi

View File

@ -1,13 +1,4 @@
export HISTFILE=~/.zsh_history
export HISTSIZE=1000
export SAVEHIST=2000
setopt hist_expire_dups_first # delete duplicates first when HISTFILE size exceeds HISTSIZE
setopt hist_ignore_dups # ignore duplicated commands history list
setopt hist_ignore_space # ignore commands that start with space
setopt hist_verify # show command with history expansion to user before running it
export EDITOR=vim
# enable color support of ls, less and man, and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
@ -24,3 +15,11 @@ if [ -x /usr/bin/dircolors ]; then
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
fi
# enable auto-suggestions based on the history
if [ -f /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh ]; then
. /usr/share/zsh-autosuggestions/zsh-autosuggestions.zsh
# change suggestion color
ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=#999'
fi

View File

@ -1,13 +1,14 @@
so () {
[ -f "$1" ] && source "$1"
}
so /etc/zsh_command_not_found
so "$HOME"/.subbash/aliases
so "$HOME"/.subbash/functions
so "$HOME"/.subzsh/export
so "$HOME"/.subzsh/options
so "$HOME"/.subzsh/completion
so "$HOME"/.subzsh/history
so "$HOME"/.subzsh/prompt
so "$HOME"/.subzsh/other
so "$HOME"/.subbash/aliases
so "$HOME"/.subbash/functions
so "$HOME"/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh

6
.zshrc
View File

@ -1,3 +1,9 @@
# .zshrc by TheK4n
# https://github.com/TheK4n/dotfiles
if [ -f $HOME/.subzsh/sourcer ]; then
source $HOME/.subzsh/sourcer
fi

View File

@ -14,9 +14,9 @@ backup:
install:
ln -s $(PWD)/.subbash ~ || true
ln -s $(PWD)/.subzsh ~ || true
ln -s $(PWD)/.bashrc ~ || true
ln -s $(PWD)/.zshrc ~ || true
ln -s $(PWD)/.zshrc ~ || true
ln -s $(PWD)/.tmux.conf ~ || true
vim: