Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 574546 - app-misc/tmux-2.1: attach-session -dt does not work correctly
Summary: app-misc/tmux-2.1: attach-session -dt does not work correctly
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Shell Tools project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-12 09:12 UTC by Andrew Udvare
Modified: 2019-01-08 03:27 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
reattach -d fix (fix-reattach-with-session-list.patch,421 bytes, patch)
2016-02-12 09:12 UTC, Andrew Udvare
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Udvare 2016-02-12 09:12:21 UTC
Created attachment 425288 [details, diff]
reattach -d fix

I was in #tmux and reported this issue and it was found to be a real bug but not yet resolved. However I was pointed at the right place to fix it, but that was for the latest HEAD of tmux. I found the equivalent way to fix this for tmux 2.1. Patch is attached.

This restores previously working behaviour (perhaps version 2.0?). I am affected this bug on several systems, including tmux 2.1 on OS X (via MacPorts).

~/.tmux.conf:

unbind C-b
set -g prefix C-a
set -g history-limit 10000
bind-key a send-key C-a
bind-key C-a last-window
setw -g allow-rename off

# Prefer horizontal split by default
bind-key '"' split-window -h

# vi mode
setw -g mode-keys vi
set -g status-keys vi

# Bind extra keys for page up/down mainly for laptop use
bind-key -t vi-edit Up history-up
bind-key -t vi-edit Down history-down

# Bind s to use choose-tree but detach and reattach session
# http://stackoverflow.com/a/29738833/374110
# As of 2.1 attach-session -dt is not working properly; requires patch: https://gist.github.com/anonymous/7cf326fa33901d9665f9
bind-key s choose-tree -b "attach-session -dt '%%'"

bind r source-file ~/.tmux.conf \; display-message "Configuration reloaded..."

# Colours
set-option -g status-bg cyan

# Refresh the status bar every 30 seconds
set-option -g status-interval 30

# Open new window in current directory, for tmux 1.9+
bind-key c new-window -c "#{pane_current_path}"

# Faster escape
set-option -sg escape-time 0
Comment 1 Andrew Udvare 2016-02-13 21:53:58 UTC
Upstream commit (same as patch): ​https://github.com/tmux/tmux/commit/f2ec911b8a0bb88d23f16b7d9e0f41f29d4ac541