From 9ba799111c254f6edb537255d447b7052c8a45e6 Mon Sep 17 00:00:00 2001 From: Jim Hester Date: Fri, 16 Nov 2012 10:23:33 -0500 Subject: [PATCH] Replace reset-prompt with push-line and accept-line The in memory history is not updated until an accept line command, so you have to push enter before it is correct, this commit replaces the reset-prompt with an accept-line. It also adds a push-line, to preserve the current editing buffer --- .../per-directory-history/per-directory-history.plugin.zsh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/per-directory-history/per-directory-history.plugin.zsh b/plugins/per-directory-history/per-directory-history.plugin.zsh index 22383b8b9..61e8b5a62 100644 --- a/plugins/per-directory-history/per-directory-history.plugin.zsh +++ b/plugins/per-directory-history/per-directory-history.plugin.zsh @@ -65,12 +65,13 @@ function per-directory-history-toggle-history() { if [[ $_per_directory_history_is_global == true ]]; then _per-directory-history-set-directory-history - echo "using local history\n" + print "\nusing local history\n" else _per-directory-history-set-global-history - echo "using global history\n" + print "\nusing global history\n" fi - zle reset-prompt + zle .push-line + zle .accept-line } autoload per-directory-history-toggle-history