mirror of
https://github.com/atuinsh/atuin.git
synced 2025-06-26 21:01:46 +02: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
|
# Source this in your ~/.zshrc
|
||||||
autoload -U add-zsh-hook
|
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)
|
export ATUIN_SESSION=$(atuin uuid)
|
||||||
|
|
||||||
_atuin_preexec() {
|
_atuin_preexec() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user