diff options
| -rw-r--r-- | atuin/src/shell/atuin.zsh | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/atuin/src/shell/atuin.zsh b/atuin/src/shell/atuin.zsh index afff2d33..7091382a 100644 --- a/atuin/src/shell/atuin.zsh +++ b/atuin/src/shell/atuin.zsh @@ -9,6 +9,15 @@ # Source this in your ~/.zshrc autoload -U add-zsh-hook + +# If zsh-autosuggestions is installed, configure it to use Atuin's search. If +# you'd like to override this, then add your config after the $(atuin init zsh) +# in your .zshrc +_zsh_autosuggest_strategy_atuin() { + suggestion=$(atuin search --cmd-only --limit 1 --search-mode prefix "$1") +} +ZSH_AUTOSUGGEST_STRATEGY=("atuin" "${ZSH_AUTOSUGGEST_STRATEGY[@]}") + export ATUIN_SESSION=$(atuin uuid) _atuin_preexec() { |
