tmux-plugins / tpm

Tmux Plugin Manager
MIT License
11.9k stars 417 forks source link

i think there is an issue with uppercase letter in @plugin! 🤔 #213

Closed faynopi closed 1 year ago

faynopi commented 2 years ago

Hello, I know it's weird but I was developing this plugin called tmux-thmIp and as you can see the i is capital on the repo! the actual problem was when I added this line to my config file to test it with TPM

set -g @plugin 'itsnexn/tmux-thmIp'

suddenly my terminal froze and I couldn't open a new tmux window because it said:

server exited unexpectedly

after a bit, I commented the line that I added to TPM and killed the tmux process with kill -9 tmux (i killed the server there was also a client)... then I tried again this time with tmux -f /dev/null and it worked! I debugged a bit then i somehow find out that i causing a problem!

NOTE: I also tried tmux kill-server and it just froze!

bruno- commented 2 years ago

Hey, a PR with a fix is welcome!

faynopi commented 2 years ago

Hey, a PR with a fix is welcome!

Sure ill check to see if can fix it!

According to RFC 3986:

the scheme and host are case-insensitive and therefore should be normalized to lowercase. For example, the URI HTTP://www.EXAMPLE.com/ is equivalent to http://www.example.com/. The other generic syntax components are assumed to be case-sensitive unless specifically defined otherwise by the scheme

And RFC 7230:

The scheme and host are case-insensitive and normally provided in lowercase; all other components are compared in a case-sensitive manner.

but a simple test shows that:

https://github.com/TMUX-PLUGINS/TPM and https://github.com/tmux-plugins/tpm are shown the same result... (I also tried to clone the repos and it worked!) so because we don't know where the problem is we can just grep the plugin names as lowercase this should work until we find the actual problem!

bruno- commented 2 years ago

https://github.com/TMUX-PLUGINS/TPM and https://github.com/tmux-plugins/tpm are shown the same result... (I also tried to clone the repos and it worked!)

This is github's feature. If you navigate to https://github.com/TMUX-PLUGINS/TPM in a browser they will show tpm repo.