diff --git a/dotfiles/.zinit.zsh b/dotfiles/.zinit.zsh index 4ca100a..6b6ddfc 100644 --- a/dotfiles/.zinit.zsh +++ b/dotfiles/.zinit.zsh @@ -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 diff --git a/dotfiles/.zshrc b/dotfiles/.zshrc index 0d1c98b..aaf506b 100644 --- a/dotfiles/.zshrc +++ b/dotfiles/.zshrc @@ -18,12 +18,14 @@ path+=("$HOME/.cargo/bin") export PATH #--------------------------------------------------------------------------------# ### Zsh config -# Configure command history saving -HISTFILE="$HOME/.zsh_history" -HISTSIZE=500000 -SAVEHIST=500000 -setopt INC_APPEND_HISTORY -setopt SHARE_HISTORY +# 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 #---------------------------------------------------------------------------------#