mirror of
https://github.com/atuinsh/atuin.git
synced 2024-12-26 17:09:14 +01:00
feat: integrate with zsh-autosuggestions (#1479)
* feat: integrate with zsh-autosuggestions * Update atuin/src/shell/atuin.zsh Co-authored-by: Patrick Jackson <patrick@jackson.dev> * Update atuin/src/shell/atuin.zsh Co-authored-by: Patrick Jackson <patrick@jackson.dev> * feedback --------- Co-authored-by: Patrick Jackson <patrick@jackson.dev>
This commit is contained in:
parent
e2a4e9cf13
commit
356324b341
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user