ref .zshrc
This commit is contained in:
parent
1551373a1e
commit
f0d635c121
13
.subzsh/history
Normal file
13
.subzsh/history
Normal 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'
|
||||||
@ -25,13 +25,3 @@ bindkey '^[[6~' end-of-buffer-or-history # page down
|
|||||||
bindkey '^[[H' beginning-of-line # home
|
bindkey '^[[H' beginning-of-line # home
|
||||||
bindkey '^[[F' end-of-line # end
|
bindkey '^[[F' end-of-line # end
|
||||||
bindkey '^[[Z' undo # shift + tab undo last action
|
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
|
|
||||||
|
|||||||
@ -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
|
# enable color support of ls, less and man, and also add handy aliases
|
||||||
if [ -x /usr/bin/dircolors ]; then
|
if [ -x /usr/bin/dircolors ]; then
|
||||||
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
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:*' list-colors "${(s.:.)LS_COLORS}"
|
||||||
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
|
zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#)*=0=01;31'
|
||||||
fi
|
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
|
||||||
@ -1,13 +1,14 @@
|
|||||||
|
|
||||||
so () {
|
so () {
|
||||||
[ -f "$1" ] && source "$1"
|
[ -f "$1" ] && source "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
so /etc/zsh_command_not_found
|
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/options
|
||||||
so "$HOME"/.subzsh/completion
|
so "$HOME"/.subzsh/completion
|
||||||
|
so "$HOME"/.subzsh/history
|
||||||
so "$HOME"/.subzsh/prompt
|
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
|
so "$HOME"/.zsh/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||||
|
|||||||
6
.zshrc
6
.zshrc
@ -1,3 +1,9 @@
|
|||||||
|
|
||||||
|
# .zshrc by TheK4n
|
||||||
|
# https://github.com/TheK4n/dotfiles
|
||||||
|
|
||||||
if [ -f $HOME/.subzsh/sourcer ]; then
|
if [ -f $HOME/.subzsh/sourcer ]; then
|
||||||
source $HOME/.subzsh/sourcer
|
source $HOME/.subzsh/sourcer
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
2
Makefile
2
Makefile
@ -14,9 +14,9 @@ backup:
|
|||||||
|
|
||||||
install:
|
install:
|
||||||
ln -s $(PWD)/.subbash ~ || true
|
ln -s $(PWD)/.subbash ~ || true
|
||||||
ln -s $(PWD)/.subzsh ~ || true
|
|
||||||
ln -s $(PWD)/.bashrc ~ || true
|
ln -s $(PWD)/.bashrc ~ || true
|
||||||
ln -s $(PWD)/.zshrc ~ || true
|
ln -s $(PWD)/.zshrc ~ || true
|
||||||
|
ln -s $(PWD)/.zshrc ~ || true
|
||||||
ln -s $(PWD)/.tmux.conf ~ || true
|
ln -s $(PWD)/.tmux.conf ~ || true
|
||||||
|
|
||||||
vim:
|
vim:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user