zellij
zellij copied to clipboard
Delete all session with random names
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 😊
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 that's neat, thanks!