You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
I run Kubuntu 20.04 in Swedish and I'm unable to install the awscli plugin:
$ asdf plugin-add awscli
awscli is invalid. Name must match regex ^[a-zA-Z0-9_-]+$
After some digging I found that there may be a problem with the swedish locale not including the letter "w" properly. (We swedes have always had a complicated relationship with "w", e.g. in collation it should according to some be sorted under "v".) After reading more about it, it struck me that expressions like a-z very much depends on the language implied. If languages have additional characters within the a-z range or if alphabets are ordered differently, expressions like a-z do not make sense.
One way to solve this is to specify the language every time such expressions are used. E.g. in plugins.bash, grep could be preceded with LANG=C.
Another way to solve the problem would be to use regex character classes instead, e.g. [[:alpha:][:digit:]_-]. This is probably not what we want unless plugins with names in other alphabets should be considered. However, languages that don't include the letters a-z will then not work with existing plugin names...
Thanks for the bug report @jmidgren ! This is new to me.
I need to check past issues before fixing this, but I think our reasoning for adding the ^[a-zA-Z0-9_-]+$ regex check for plugin names was to prevent whitespace from being used in a plugin name, as that caused issues in the .tool-versions files. If that is the only reason we added the regex check, expanding to something like ^[[:alpha:][:digit:]_-]$ should be fine.
changed the title
bug: Unalbe to install awscli plugin with recent Swedish localeJun 3, 2022