Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Start tmux in choose-tree mode

Tags:

tmux

When starting tmux, if I want to choose a session but am not sure which one, it would be really handy to launch tmux in the choose-tree mode, so that once I chose a session, it didn't leave a detached and empty one behind.

I found this asked on another site, and it has an answer. But, the person who answered it deleted their account which took their answer with it. I can see a comment to their (now empty) answer which said it involves a ;.

My strong hope is from a bash script, being able to run exec tmux (some arguments) to get this to work. I've already written a tmux starter script, and would like to add this to it.

like image 506
user1902689 Avatar asked Oct 25 '25 03:10

user1902689


1 Answers

Apparently there's a website called removeddit.com that can show deleted comments/threads from Reddit.

Turns out this works:

tmux attach\; choose-tree

Or, for my specific case:

exec tmux attach\; choose-tree

There might be a better way, but this seems to work.

Escaping the ; prevents bash from processing it, allowing tmux to use it.

like image 90
user1902689 Avatar answered Oct 27 '25 01:10

user1902689



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!