FR: shpool shouldn't allow non alphanumeric characters in session name
thiswillbeyourgithub opened this issue · comments
For some reason (probably a bug fom my fzf selector and not a shpool bug per se) I created a shpool session with a name straight from the shpool list output. Look at that:
❯ shpool list
NAME STARTED_AT STATUS
tes
test 2024-06-19T10:04:37.285+00:00 disconnected 2024-06-19T10:05:16.872+00:00 disconnected
As you can see this is a problem because it makes the session tough to kill, we don't know where the actual name ends.
Suggestions:
- Put the NAME column as the rightmost column, this way no doubt about where the string ends
- Possibly: wrap the session name in 'quotation mark'?
- Better: Disallow non alphanumeric characters in the session name. So only common letters and ints are allowed. Maybe with a few symbols like - and _ but certainly no spaces.
I think suggestion 3 is probably the way to go. I don't see any reasons to have non-alphanum names in session names.
Thanks for flagging this!
I currently name my screen
sessions who@host.where:/dev/tty1
. So I would respectfully ask that session names be rejected based on whitespace exclusion, instead of special character inclusion.
That's a good point, yeah whitespace (really just tabs) is the real issue here since they can mangle the tsv output of shpool list