Latest commit 8a673b2 Sep 2, 2016 @antxgit antxgit committed with Better parsing of settings.
Replacing prefix only if is in head of line.

Tested using below
nvm proxy http://username:password@cchproxy:8080 & nvm proxy

nvm proxy username:password@cchproxy:8080 & nvm proxy
nvm proxy http://proxy:10080 & nvm proxy
nvm proxy http://proxy:proxy@proxy:10080 & nvm proxy
nvm proxy proxy:10080 & nvm proxy

concerning  #186