Last active
May 29, 2019 21:29
-
-
Save lordi/dba83f2cf220c11b7a21 to your computer and use it in GitHub Desktop.
tmux one-liner to show a menu of sessions to attach to
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tmux list-sessions | awk -F: '{ print $1 " \"" $2 "\""; }' |\ | |
xargs dialog --ok-label 'Attach' --cancel-label 'New session' --menu tmux 20 80 20 2>/tmp/tmux-session \ | |
&& tmux attach-session -t $(cat /tmp/tmux-session; rm /tmp/tmux-session) \ | |
|| tmux |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment