save-current: support session with space in name

pull/447/head
maybeetree 2022-08-07 22:14:08 +02:00
parent e0a5636ea2
commit 0938a75c05
1 changed files with 6 additions and 14 deletions

View File

@ -91,24 +91,16 @@ state_format() {
echo "$format"
}
session_selector_windows() {
[ -z "$TARGET_SESSION" ] &&
echo "-a" ||
echo "-t $TARGET_SESSION"
}
session_selector_panes() {
[ -z "$TARGET_SESSION" ] &&
echo "-a" ||
echo "-s -t $TARGET_SESSION"
}
dump_panes_raw() {
tmux list-panes $(session_selector_panes) -F "$(pane_format)"
[ -z "$TARGET_SESSION" ] &&
tmux list-panes -a -F "$(pane_format)" ||
tmux list-panes -s -t "$TARGET_SESSION" -F "$(pane_format)"
}
dump_windows_raw(){
tmux list-windows $(session_selector_windows) -F "$(window_format)"
[ -z "$TARGET_SESSION" ] &&
tmux list-windows -a -F "$(window_format)" ||
tmux list-windows -t "$TARGET_SESSION" -F "$(window_format)"
}
toggle_window_zoom() {