nvm-sh / nvm

Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions
MIT License
78.69k stars 7.89k forks source link

The description "POSIX-compliant bash script" conflicts. #2374

Open ghost opened 3 years ago

ghost commented 3 years ago

Hello, first of all my apologies for not mentioning any bugs nor anything else at all.

I see you are describing your project is made of POSIX-compliant bash scripts; bash is not POSIX-compliant while sh is.

What really did you intend?

ljharb commented 3 years ago

bash is indeed posix-compliant; “posix-compliant” is true for anything that’s a superset of posix.

ghost commented 3 years ago

bash is indeed posix-compliant; “posix-compliant” is true for anything that’s a superset of posix.

Then have you ever read this document? It describes what utilities should be at least available on POSIX.

Also if you were not to care for compatibility, I'm sorry for making this issue.

ljharb commented 3 years ago

That’s a long document. Which things in it aren’t part of bash?

richard-whitty commented 3 years ago

well for one local isn't part of POSIX, which is used liberally. (actually came here to open the same issue)

ljharb commented 3 years ago

@richard-whitty indeed, but its use is a no-op on the POSIX shells that lack local (dash, sh). It does warn on ksh, but has no other effect. "POSIX-compliant" doesn't mean "uses no non-POSIX features"; it means "works on POSIX systems", which this does.