Session names do not need to be numbers but if they are you can do something 
like this:

tmux ls -F '#{p/-3:session_name}: #{session_windows} windows (created 
#{t:session_created})#{?session_grouped, (group 
,}#{session_group}#{?session_grouped,),}#{?session_attached, (attached),}'|sort 
-n


On Wed, Aug 26, 2020 at 09:32:34AM -0500, 'Matt Zagrabelny' via tmux-users 
wrote:
> Greetings,
> 
> Here is the current output of tmux ls...
> 
> $ tmux ls
> 104: 1 windows (created Wed Aug  5 08:23:14 2020)
> 144: 1 windows (created Thu Aug 13 15:45:35 2020)
> 3: 1 windows (created Mon Jun 22 07:26:56 2020)
> 
> I would like the output to be numerically sorted by the id of the
> session and also have it justified so the digits line up in their
> correct places. Something like this...
> 
> $ tmux ls
>   3: 1 windows (created Mon Jun 22 07:26:56 2020)
> 104: 1 windows (created Wed Aug  5 08:23:14 2020)
> 144: 1 windows (created Thu Aug 13 15:45:35 2020)
> 
> Is this something that others would like to see? I could open up an
> issue on github or take a stab at a patch. What do folks think?
> 
> -m
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "tmux-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web, visit 
> https://groups.google.com/d/msgid/tmux-users/CAOLfK3UrZz1ccez4%3DZH8WUA3-5G17ZOGjpBv2Sv4QFERRX274g%40mail.gmail.com.

-- 
You received this message because you are subscribed to the Google Groups 
"tmux-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web, visit 
https://groups.google.com/d/msgid/tmux-users/20200826144009.vtds7ma63pbpwww5%40yelena.

Reply via email to