-
Notifications
You must be signed in to change notification settings - Fork 423
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restoring pane title #342
base: master
Are you sure you want to change the base?
Restoring pane title #342
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,6 +50,8 @@ pane_format() { | |
format+="#{pane_pid}" | ||
format+="${delimiter}" | ||
format+="#{history_size}" | ||
format+="${delimiter}" | ||
format+="#{pane_title}" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd prefer if we grouped all This will be a breaking change when performing a restore with the old resurrect file, but that's a separate concern. |
||
echo "$format" | ||
} | ||
|
||
|
@@ -227,14 +229,14 @@ fetch_and_dump_grouped_sessions(){ | |
dump_panes() { | ||
local full_command | ||
dump_panes_raw | | ||
while IFS=$d read line_type session_name window_number window_name window_active window_flags pane_index dir pane_active pane_command pane_pid history_size; do | ||
while IFS=$d read line_type session_name window_number window_name window_active window_flags pane_index dir pane_active pane_command pane_pid history_size pane_title; do | ||
# not saving panes from grouped sessions | ||
if is_session_grouped "$session_name"; then | ||
continue | ||
fi | ||
full_command="$(pane_full_command $pane_pid)" | ||
dir=$(echo $dir | sed 's/ /\\ /') # escape all spaces in directory path | ||
echo "${line_type}${d}${session_name}${d}${window_number}${d}${window_name}${d}${window_active}${d}${window_flags}${d}${pane_index}${d}${dir}${d}${pane_active}${d}${pane_command}${d}:${full_command}" | ||
echo "${line_type}${d}${session_name}${d}${window_number}${d}${window_name}${d}${window_active}${d}${window_flags}${d}${pane_index}${d}${pane_title}${d}${dir}${d}${pane_active}${d}${pane_command}${d}:${full_command}" | ||
done | ||
} | ||
|
||
|
@@ -313,7 +315,7 @@ main() { | |
start_spinner "Saving..." "Tmux environment saved!" | ||
fi | ||
save_all | ||
if show_output; then | ||
if show_output; then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can we please use tabs for indentation? I'm also not happy with tabs and would like to change to two-space indentation, but I need help from someone that's willing to do that for all the repos in |
||
stop_spinner | ||
display_message "Tmux environment saved!" | ||
fi | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of naming the pane with a standalone command, can we somehow set the correct pane_title when the pane is created?