mirror of
https://github.com/tmux-plugins/tmux-resurrect.git
synced 2024-11-06 02:48:54 +00:00
Merge pull request #125 from HeathNaylor/master
Fix comparision operators. Fixes #124
This commit is contained in:
commit
a2eb3b01d2
@ -274,7 +274,7 @@ restore_shell_history() {
|
|||||||
awk 'BEGIN { FS="\t"; OFS="\t" } /^pane/ { print $2, $3, $7, $10; }' $(last_resurrect_file) |
|
awk 'BEGIN { FS="\t"; OFS="\t" } /^pane/ { print $2, $3, $7, $10; }' $(last_resurrect_file) |
|
||||||
while IFS=$d read session_name window_number pane_index pane_command; do
|
while IFS=$d read session_name window_number pane_index pane_command; do
|
||||||
if ! is_pane_registered_as_existing "$session_name" "$window_number" "$pane_index"; then
|
if ! is_pane_registered_as_existing "$session_name" "$window_number" "$pane_index"; then
|
||||||
if [ "$pane_command" = "bash" ]; then
|
if [ "$pane_command" == "bash" ]; then
|
||||||
local pane_id="$session_name:$window_number.$pane_index"
|
local pane_id="$session_name:$window_number.$pane_index"
|
||||||
# tmux send-keys has -R option that should reset the terminal.
|
# tmux send-keys has -R option that should reset the terminal.
|
||||||
# However, appending 'clear' to the command seems to work more reliably.
|
# However, appending 'clear' to the command seems to work more reliably.
|
||||||
|
@ -146,7 +146,7 @@ save_shell_history() {
|
|||||||
local pane_id="$1"
|
local pane_id="$1"
|
||||||
local pane_command="$2"
|
local pane_command="$2"
|
||||||
local full_command="$3"
|
local full_command="$3"
|
||||||
if [ "$pane_command" = "bash" ] && [ "$full_command" = ":" ]; then
|
if [ "$pane_command" == "bash" ] && [ "$full_command" == ":" ]; then
|
||||||
# leading space prevents the command from being saved to history
|
# leading space prevents the command from being saved to history
|
||||||
# (assuming default HISTCONTROL settings)
|
# (assuming default HISTCONTROL settings)
|
||||||
local write_command=" history -w '$(resurrect_history_file "$pane_id")'"
|
local write_command=" history -w '$(resurrect_history_file "$pane_id")'"
|
||||||
|
Loading…
Reference in New Issue
Block a user