tmux-plugins / tpm

Tmux Plugin Manager
MIT License
12.2k stars 432 forks source link

NetBSD - TPM locks up the entire system. #263

Open Retro64XYZ opened 1 year ago

Retro64XYZ commented 1 year ago

doo@otaku [22:48:20] [~/.tmux/plugins/tpm] [master] -> % ./tpm tr: unknown option -- C usage: tr [-cs] string1 string2 tr [-c] -d string1 tr [-c] -s string1 tr [-c] -ds string1 string2 tr: unknown option -- C usage: tr [-cs] string1 string2 tr [-c] -d string1 tr [-c] -s string1 tr [-c] -ds string1 string2 /sdf/arpa/af/d/doo/.tmux/plugins/tpm/scripts/check_tmux_version.sh: line 67: [: : integer expression expected

I have an account on SDF. I have installed TPM and when I try to run tmux, nothing happens. I then tried to run TPM from the folder and it locks up completely. I have to disconnect from SSH and reconnect to get access again. The error is above. Is there a fix for this?

the-homeless-god commented 9 months ago

Same behavior

RossBarnie commented 5 months ago

Looking at https://man.netbsd.org/tr.1, it seems the BSD version of tr doesn't support the -C flag available in the GNU version so this won't work. Functionally it means NetBSD isn't supported by TPM. Someone with NetBSD and a little bash knowledge should be able to add the platform-specific changes that are needed.

the-homeless-god commented 5 months ago

Looking at https://man.netbsd.org/tr.1, it seems the BSD version of tr doesn't support the -C flag available in the GNU version so this won't work. Functionally it means NetBSD isn't supported by TPM. Someone with NetBSD and a little bash knowledge should be able to add the platform-specific changes that are needed.

How can I isolate tpm to avoid to freeze whole system and restarts? I will push a pull request to tpm with fix when you will help me to figure out about debugging it without the system restart

RossBarnie commented 4 months ago

I don't know BSD well enough to know. I'd suggest a container environment like docker or podman but I have no idea if they even work on BSD to be honest. One approach would be to look for the tr instances in the code and return something hard-coded instead of calling out to tr or any other tool you come across that breaks your system, then slowly reintroduce them with a conditional statement where one branch uses the current implementation (the default) and the other for BSD.