Disable default zsh history if atuin is present, and only load zsh atuin plugin if atuin is present
This commit is contained in:
parent
f91207f4fb
commit
6d09ce9640
2 changed files with 12 additions and 7 deletions
|
@ -7,7 +7,10 @@ zinit light zdharma-continuum/fast-syntax-highlighting; # Syntax highlighting
|
|||
zinit light zsh-users/zsh-autosuggestions; # Command suggestions
|
||||
zinit light Tarrasch/zsh-bd; # bd command
|
||||
zinit light zpm-zsh/colorize; # Colorizes a handfull of comands
|
||||
zinit light ellie/atuin; # Better history search
|
||||
|
||||
if command -v atuin &> /dev/null; then
|
||||
zinit light ellie/atuin; # Add atuin (better cmd history) support to zsh
|
||||
fi
|
||||
|
||||
export ZSH_AUTOSUGGEST_STRATEGY=(history completion) # Use history when available, then completion
|
||||
[[ ! -f ~/.p10k.zsh ]] || source ~/.p10k.zsh # Load Powerlevel10k config
|
||||
|
|
|
@ -18,12 +18,14 @@ path+=("$HOME/.cargo/bin")
|
|||
export PATH
|
||||
#--------------------------------------------------------------------------------#
|
||||
### Zsh config
|
||||
# Configure command history saving
|
||||
# Configure command history saving (if atuin is not found)
|
||||
if ! command -v atuin &> /dev/null; then
|
||||
HISTFILE="$HOME/.zsh_history"
|
||||
HISTSIZE=500000
|
||||
SAVEHIST=500000
|
||||
setopt INC_APPEND_HISTORY
|
||||
setopt SHARE_HISTORY
|
||||
fi
|
||||
# Configure emacs keys
|
||||
bindkey -e
|
||||
#---------------------------------------------------------------------------------#
|
||||
|
|
Reference in a new issue