fix tmux session

This commit is contained in:
thek4n 2026-07-15 23:20:32 +03:00
parent 2e5db33e70
commit db8731b0b9
7 changed files with 7 additions and 7 deletions

View File

@ -23,5 +23,5 @@ session_to_attach="$("${tmux_list_sessions_script}" | fzf | awk '{printf $1}')"
readonly session_to_attach
if [ -n "${session_to_attach}" ]; then
tmux switch-client -t "${session_to_attach}"
tmux switch-client -t "${session_to_attach}" -c "$(tmux display -p '#{client_tty}')"
fi

View File

@ -32,4 +32,4 @@ if ! tmux has-session -t="${session}" 2>/dev/null; then
tmux new-session -d -n 1 -c "${project_dir}" -s "${session}"
fi
tmux switch-client -t "${session}"
tmux switch-client -t "${session}" -c "$(tmux display -p '#{client_tty}')"

View File

@ -16,4 +16,4 @@ if ! tmux has-session -t="${SESSION}"; then
tmux send-keys -t "${SESSION}:${MAINW}.2" ':Telescope find_files' Enter
fi
tmux switch-client -t "${SESSION}"
tmux switch-client -t "${SESSION}" -c "$(tmux display -p '#{client_tty}')"

View File

@ -12,4 +12,4 @@ if ! tmux has-session -t="${SESSION}"; then
tmux rename-window -t="${SESSION}:1" "${MAINW}"
fi
tmux switch-client -t "${SESSION}"
tmux switch-client -t "${SESSION}" -c "$(tmux display -p '#{client_tty}')"

View File

@ -21,4 +21,4 @@ WORKING_PROJECT="$(mktemp -td "${SESSION}.XXXX")"
readonly WORKING_PROJECT
tmux new-session -s "${SESSION}" -d -c "${WORKING_PROJECT}"
tmux switch-client -t "${SESSION}"
tmux switch-client -t "${SESSION}" -c "$(tmux display -p '#{client_tty}')"

View File

@ -31,4 +31,4 @@ if ! tmux has-session -t="${SESSION}" 2>/dev/null; then
tmux new-session -s "${SESSION}" -c "${HOME}" -d -n "1" "TERM=xterm-256color ssh ${choosed_ssh_server} || read"
fi
tmux switch-client -t "${SESSION}"
tmux switch-client -t "${SESSION}" -c "$(tmux display -p '#{client_tty}')"

View File

@ -16,4 +16,4 @@ if ! tmux has-session -t="${SESSION}"; then
tmux send-keys -t "${SESSION}:${MAINW}.2" ':Lazy' Enter
fi
tmux switch-client -t "${SESSION}"
tmux switch-client -t "${SESSION}" -c "$(tmux display -p '#{client_tty}')"