I know that a child process cannot directly affect its parent process, HOWEVER, how does a tool like nvm work? It's a CLI tool that can "instantly" switch between nodejs versions, which I think means modifying the PATH somehow to point to a different binary installed on your PC.
By "instantly"...