Merge 9d5d28f353
into 027960ad25
commit
725e93c32a
|
@ -310,7 +310,7 @@ restore_shell_history() {
|
|||
|
||||
if [ "$pane_command" = "bash" ]; then
|
||||
local read_command="history -r '$history_file'"
|
||||
tmux send-keys -t "$pane_id" "$read_command" C-m
|
||||
tmux send-keys -t "$pane_id" M-z "$read_command" C-m M-Z
|
||||
elif [ "$pane_command" = "zsh" ]; then
|
||||
local accept_line="$(expr "$(zsh -i -c bindkey | grep -m1 '\saccept-line$')" : '^"\(.*\)".*')"
|
||||
local read_command="fc -R '$history_file'; clear"
|
||||
|
|
|
@ -176,9 +176,8 @@ save_shell_history() {
|
|||
local read_command=" $history_r '$(resurrect_history_file "$pane_id" "$pane_command")'"
|
||||
# C-e C-u is a Bash shortcut sequence to clear whole line. It is necessary to
|
||||
# delete any pending input so it does not interfere with our history command.
|
||||
tmux send-keys -t "$pane_id" "$end_of_line" "$backward_kill_line" "$write_command" "$accept_line"
|
||||
# Immediately restore after saving
|
||||
tmux send-keys -t "$pane_id" "$end_of_line" "$backward_kill_line" "$read_command" "$accept_line"
|
||||
# and immediately restore after saving
|
||||
tmux send-keys -t "$pane_id" "$end_of_line" "$backward_kill_line" M-z "$write_command;$read_command" "$accept_line" M-Z
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue