Repository: nvm
Issue: nvm.sh - executing under ksh fails as local is missing. Remediation by using typeset instead
Labels: shell: ksh

<!-- Thank you for being interested in nvm! Please help us by filling out the following form if you‘re having trouble. If you have a feature request, or some other question, please feel free to clear out the form. Thanks! -->

#### Operating system and version:

RHEL9, Ubuntu using ksh as the login shell

Remediation is to change the use of "`local`" for setting variables and replace with "`typeset`"

#### How did you install `nvm`?
As per the README
#### What steps did you perform?


#### What happened?

`. $NVM_DIR/nvm.sh
-ksh: .: line 4373: local: not found
-ksh: .: line 4343: local: not found
-ksh: .: line 4345: local: not found
-ksh: .: line 4346: local: not found
-ksh: .[1127]: local: not found
-ksh: .[506]: local: not found
-ksh: .[396]: local: not found
-ksh: .[398]: local: not found
-ksh: .[406]: local: not found
-ksh: .[408]: local: not found
-ksh: .[396]: local: not found
-ksh: .[398]: local: not found
-ksh: .[406]: local: not found
-ksh: .[408]: local: not found
-ksh: .[1133]: local: not found
-ksh: .: line 2778: local: not found
-ksh: .: line 2809: local: not found
-ksh: .: line 2932: local: not found
-ksh: .: line 2937: local: not found
-ksh: .: line 2938: local: not found
-ksh: .: line 3540: local: not found
-ksh: .: line 3541: local: not found
-ksh: .: line 3542: local: not found
-ksh: .: line 3543: local: not found
-ksh: .: line 3545: local: not found
-ksh: .: line 3546: local: not found
-ksh: .[2508]: local: not found
-ksh: .[2510]: local: not found
-ksh: .[576]: local: not found
-ksh: .[578]: local: not found
-ksh: .[589]: local: not found
-ksh: .[1250]: local: not found
-ksh: .[1252]: local: not found
-ksh: .[1259]: local: not found
-ksh: .[1261]: local: not found
-ksh: .[1263]: local: not found
-ksh: .[506]: local: not found
-ksh: .[1265]: local: not found
-ksh: .[506]: local: not found
-ksh: .[1267]: local: not found
-ksh: .[506]: local: not found
-ksh: .[1209]: local: not found
-ksh: .[1210]: local: not found
-ksh: .[1150]: local: not found
-ksh: .[1153]: local: not found
-ksh: .[1155]: local: not found
-ksh: .[1157]: local: not found
-ksh: .[754]: local: not found
-ksh: .[1240]: local: not found
-ksh: .[1285]: local: not found
-ksh: .[776]: local: not found
-ksh: .[784]: local: not found
-ksh: .[786]: local: not found
-ksh: .[153]: local: not found
-ksh: .[1873]: local: not found
-ksh: .[1875]: local: not found
-ksh: .: line 540: local: not found
-ksh: .: line 542: local: not found
-ksh: .: line 551: local: not found
-ksh: .: line 552: local: not found
-ksh: .[576]: local: not found
-ksh: .[578]: local: not found
-ksh: .[589]: local: not found
-ksh: .[1250]: local: not found
-ksh: .[1252]: local: not found
-ksh: .[1259]: local: not found
-ksh: .[1261]: local: not found
-ksh: .[1263]: local: not found
-ksh: .[506]: local: not found
-ksh: .[1265]: local: not found
-ksh: .[506]: local: not found
-ksh: .[1267]: local: not found
-ksh: .[506]: local: not found
-ksh: .[1209]: local: not found
-ksh: .[1210]: local: not found
-ksh: .[1150]: local: not found
-ksh: .[1153]: local: not found
-ksh: .[1155]: local: not found
-ksh: .[1157]: local: not found
-ksh: .[754]: local: not found
-ksh: .[1240]: local: not found
-ksh: .[1285]: local: not found
-ksh: .[776]: local: not found
-ksh: .[784]: local: not found
-ksh: .[786]: local: not found
-ksh: .[153]: local: not found
-ksh: .[1873]: local: not found
-ksh: .[1875]: local: not found
-ksh: .: line 555: local: not found
-ksh: .: line 153: local: not found
-ksh: .[1873]: local: not found
-ksh: .[1875]: local: not found
-ksh: .: line 3624: local: not found
-ksh: .[525]: local: not found
-ksh: .[506]: local: not found
-ksh: .: line 3645: local: not found
-ksh: .: line 3655: local: not found
-ksh: .: line 2550: local: not found
-ksh: .: line 2559: local: not found
-ksh: .: line 2561: local: not found
-ksh: .: line 2578: local: not found
-ksh: .[1873]: local: not found
-ksh: .[1875]: local: not found
-ksh: .: line 2587: local: not found
-ksh: .: line 2615: local: not found
-ksh: .: line 2541: local: not found
-ksh: .: line 2629: local: not found
-ksh: .: line 2541: local: not found
-ksh: .: line 2643: local: not found
-ksh: .: line 2541: local: not found
-ksh: .: line 2657: local: not found
-ksh: .[419]: local: not found
-ksh: .: line 2541: local: not found`

#### What did you expect to happen?

dot-in of $NVM executes without error

#### Is there anything in any of your profile files that modifies the `PATH`?
<!--  (e.g. `.bashrc`, `.bash_profile`, `.zshrc`, etc) -->



```sh

```
</details>