{"action":"created","issue":{"url":"https://api.github.com/repos/edc/bass/issues/28","repository_url":"https://api.github.com/repos/edc/bass","labels_url":"https://api.github.com/repos/edc/bass/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/edc/bass/issues/28/comments","events_url":"https://api.github.com/repos/edc/bass/issues/28/events","html_url":"https://github.com/edc/bass/issues/28","id":148445757,"number":28,"title":"while sourcing nvm command works, npm and node command are not working properly","user":{"login":"shangsunset","id":3700269,"avatar_url":"https://avatars.githubusercontent.com/u/3700269?v=3","gravatar_id":"","url":"https://api.github.com/users/shangsunset","html_url":"https://github.com/shangsunset","followers_url":"https://api.github.com/users/shangsunset/followers","following_url":"https://api.github.com/users/shangsunset/following{/other_user}","gists_url":"https://api.github.com/users/shangsunset/gists{/gist_id}","starred_url":"https://api.github.com/users/shangsunset/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shangsunset/subscriptions","organizations_url":"https://api.github.com/users/shangsunset/orgs","repos_url":"https://api.github.com/users/shangsunset/repos","events_url":"https://api.github.com/users/shangsunset/events{/privacy}","received_events_url":"https://api.github.com/users/shangsunset/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":29,"created_at":"2016-04-14T18:30:52Z","updated_at":"2016-04-17T05:44:20Z","closed_at":null,"body":"Hi,\r\nSo ive put the `nvm` function in the `config.fish` and installed `node` with nvm. however, i always get `fish: Unknown command 'node'` on shell startup, so is `npm`. they will work after i execute a `nvm` command though, such as `nvm ls`.\r\n\r\nif `nvm` is already sourced, how come `node` wont work?\r\n\r\nps: tested in bash. node and npm work normally.\r\n\r\nmy config.fish:\r\n\r\n```\r\n# Fisherman config\r\nset fisher_home ~/.local/share/fisherman\r\nset fisher_config ~/.config/fisherman\r\nsource $fisher_home/config.fish\r\n\r\n# Initial config file contents, which adds /usr/local/bin to the PATH environment variable.\r\nset -g -x PATH /usr/local/bin $PATH\r\n\r\n# Homebrew\r\nset -g -x PATH /usr/local/sbin $PATH\r\n\r\n# pyenv\r\nstatus --is-interactive; and . (pyenv init -|psub)\r\n\r\nfunction nvm\r\n    bass source ~/.nvm/nvm.sh ';' nvm $argv\r\nend\r\n\r\n\r\n\r\n# Will eliminate the Fish welcome message that appears by default\r\nset -g -x fish_greeting ''\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/edc/bass/issues/comments/210960563","html_url":"https://github.com/edc/bass/issues/28#issuecomment-210960563","issue_url":"https://api.github.com/repos/edc/bass/issues/28","id":210960563,"user":{"login":"bucaran","id":8317250,"avatar_url":"https://avatars.githubusercontent.com/u/8317250?v=3","gravatar_id":"","url":"https://api.github.com/users/bucaran","html_url":"https://github.com/bucaran","followers_url":"https://api.github.com/users/bucaran/followers","following_url":"https://api.github.com/users/bucaran/following{/other_user}","gists_url":"https://api.github.com/users/bucaran/gists{/gist_id}","starred_url":"https://api.github.com/users/bucaran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bucaran/subscriptions","organizations_url":"https://api.github.com/users/bucaran/orgs","repos_url":"https://api.github.com/users/bucaran/repos","events_url":"https://api.github.com/users/bucaran/events{/privacy}","received_events_url":"https://api.github.com/users/bucaran/received_events","type":"User","site_admin":false},"created_at":"2016-04-17T05:44:19Z","updated_at":"2016-04-17T05:44:19Z","body":"@shangsunset \r\n\r\nJust `rm ~/.config/functions/config.fish`, and create a new `config.fish` with this:\r\n\r\n```fish\r\nset fisher_home ~/.local/share/fisherman\r\nset fisher_config ~/.config/fisherman\r\nsource $fisher_home/config.fish\r\n\r\nset -g -x PATH /usr/local/sbin $PATH\r\nstatus --is-interactive; and . (pyenv init -|psub)\r\n\r\n\r\n### define a nvm wrapper function so you can call it whenever you want\r\nfunction nvm\r\n     bass source ~/.nvm/nvm.sh --no-use ';' nvm $argv\r\nend\r\n\r\n### call nvm HERE so that there is no need to call it every time\r\nnvm \r\n```\r\n"}}