aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author依云 <lilydjwg@gmail.com>2025-03-12 22:27:26 +0800
committerGitHub <noreply@github.com>2025-03-12 14:27:26 +0000
commit264da9e4e964512f1e2e814c76010fd11d31b87a (patch)
treed45139bd3eb0ccf214e3ab7ac546ade620deb7f9
parentchore(deps): update cargo-dist to 0.28 (#2623) (diff)
downloadatuin-264da9e4e964512f1e2e814c76010fd11d31b87a.zip
feat(zsh): try to go to the position in zsh's history (#1469)
by using infer-next-history and then up-history. This is very helpful to execute consecutive commands with accept-line-and-down-history.
-rw-r--r--crates/atuin/src/shell/atuin.zsh2
1 files changed, 2 insertions, 0 deletions
diff --git a/crates/atuin/src/shell/atuin.zsh b/crates/atuin/src/shell/atuin.zsh
index d580f704..7d69d762 100644
--- a/crates/atuin/src/shell/atuin.zsh
+++ b/crates/atuin/src/shell/atuin.zsh
@@ -68,6 +68,8 @@ _atuin_search() {
then
LBUFFER=${LBUFFER#__atuin_accept__:}
zle accept-line
+ else
+ zle infer-next-history && zle up-history
fi
fi
}