Is there a way to sort my windows within a screen session?

Posted by jv1975 on Super User See other posts from Super User or by jv1975
Published on 2010-02-08T16:34:43Z Indexed on 2010/04/02 2:03 UTC
Read the original article Hit count: 288

Filed under:
|
|

I use screen and have ssh sessions open to a number of different machines from within my screen session. I'd like to keep them in order, for obvious reasons. Often I'll have to connect to a new machine which alphabetically/numerically should fit in between two existing windows.

I can't find any way to reorder the windows other than with the "number" command, which swaps my current window with that at the number I specified. So adding a new window to the 15 I already have and then sticking it at position 2, while keeping all the other windows in order as well is cumbersome, to say the least, requiring swaps for all windows past #2.

Is there anyway to sort the windows alphabetically? Or a way to "shift" all windows after a certain point up one spot? Or any other suggestions to insert a new window at an arbitrary point while still maintaining the order of all other windows?

Thanks!

© Super User or respective owner

Related posts about unix

Related posts about screen