import '@johnlindquist/kit';
const sessionsCmd = await $`tmux list-sessions`;
let sessions = sessionsCmd.stdout
.split('\n')
.map((line) => line.split(':')[0])
.filter((sesh) => !!sesh);
let choice = await arg('Attach to session:', sessions);
await $`kitty --hold sh -c "tmux a -t ${choice}"`;