zellij icon indicating copy to clipboard operation
zellij copied to clipboard

Delete all session with random names

Open patrick91 opened this issue 1 year ago • 2 comments

Hi there!

Sorry if this is already, supported, but I wasn't able to find it.

I create a few named sessions, one per project, and then re-use them when I need to work on that specific project.

But for random tasks I create new session and I don't give them a name. I was wondering if there's (or if it can be implemented) a way to delete all the sessions that have random names, so I only have the projects session in my killed list 😊

patrick91 avatar Jul 03 '24 09:07 patrick91

The names are generated with the names crate, so are in the format "<adjective>-<word>", so if you're careful not to name your sessions with a similar format, you could do something like zellij list-sessions --short | grep -E "^\w+-\w+$" | xargs -I{} zellij delete-session {} perhaps assigning it to an alias

Jimmyscene avatar Jul 17 '24 01:07 Jimmyscene

@Jimmyscene that's neat, thanks!

patrick91 avatar Jul 17 '24 07:07 patrick91