1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-21 21:30:09 +00:00

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
This commit is contained in:
Jim Hester 2012-11-16 10:23:33 -05:00
parent c2ae9e09ca
commit 9ba799111c

View file

@ -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