{"action":"created","issue":{"url":"https://api.github.com/repos/fisherman/fnm/issues/40","repository_url":"https://api.github.com/repos/fisherman/fnm","labels_url":"https://api.github.com/repos/fisherman/fnm/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/fisherman/fnm/issues/40/comments","events_url":"https://api.github.com/repos/fisherman/fnm/issues/40/events","html_url":"https://github.com/fisherman/fnm/issues/40","id":188238679,"number":40,"title":"`npm` only available after running `node` once","user":{"login":"saschagehlich","id":119684,"avatar_url":"https://avatars.githubusercontent.com/u/119684?v=3","gravatar_id":"","url":"https://api.github.com/users/saschagehlich","html_url":"https://github.com/saschagehlich","followers_url":"https://api.github.com/users/saschagehlich/followers","following_url":"https://api.github.com/users/saschagehlich/following{/other_user}","gists_url":"https://api.github.com/users/saschagehlich/gists{/gist_id}","starred_url":"https://api.github.com/users/saschagehlich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saschagehlich/subscriptions","organizations_url":"https://api.github.com/users/saschagehlich/orgs","repos_url":"https://api.github.com/users/saschagehlich/repos","events_url":"https://api.github.com/users/saschagehlich/events{/privacy}","received_events_url":"https://api.github.com/users/saschagehlich/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-11-09T12:42:53Z","updated_at":"2016-11-09T12:49:00Z","closed_at":null,"body":"I'm on Ubuntu 16.04.1 LTS and when I open fish the first time and enter `npm`, I get this:\r\n\r\n```\r\nsash@localhost ~> npm\r\n\r\n       function -- create a function\r\n\r\n   Synopsis\r\n       function [OPTIONS] NAME; BODY; end\r\n\r\n   Description\r\n       function creates a new function NAME with the body BODY.\r\n\r\n       A function is a list of commands that will be executed when the name of\r\n       the function is given as a command.\r\n\r\n       The following options are available:\r\n\r\n       · -a NAMES or --argument-names NAMES assigns the value of successive\r\n         command-line arguments to the names given in NAMES.\r\n\r\n       · -d DESCRIPTION or --description=DESCRIPTION is a description of what\r\n         the function does, suitable as a completion description.\r\n\r\n       · -w WRAPPED_COMMAND or --wraps=WRAPPED_COMMAND causes the function to\r\n         inherit completions from the given wrapped command. See the\r\n         documentation for complete for more information.\r\n\r\n       · -e or --on-event EVENT_NAME tells fish to run this function when the\r\n         specified named event is emitted. Fish internally generates named\r\n         events e.g. when showing the prompt.\r\n\r\n       · -v or --on-variable VARIABLE_NAME tells fish to run this function\r\n         when the variable VARIABLE_NAME changes value.\r\n\r\n       · -j PGID or --on-job-exit PGID tells fish to run this function when\r\n         the job with group ID PGID exits. Instead of PGID, the string\r\n         'caller' can be specified. This is only legal when in a command\r\n         substitution, and will result in the handler being triggered by the\r\n         exit of the job which created this command substitution.\r\n\r\n       · -p PID or --on-process-exit PID tells fish to run this function when\r\n         the fish child process with process ID PID exits.\r\n\r\n       · -s or --on-signal SIGSPEC tells fish to run this function when the\r\n         signal SIGSPEC is delivered. SIGSPEC can be a signal number, or the\r\n         signal name, such as SIGHUP (or just HUP).\r\n\r\n       · -S or --no-scope-shadowing allows the function to access the\r\n         variables of calling functions. Normally, any variables inside the\r\n         function that have the same name as variables from the calling\r\n         function are 'shadowed', and their contents is independent of the\r\n         calling function.\r\n\r\n       · -V or --inherit-variable NAME snapshots the value of the variable\r\n         NAME and defines a local variable with that same name and value when\r\n         the function is executed.\r\n\r\n       If the user enters any additional arguments after the function, they\r\n       are inserted into the environment variable array $argv. If the\r\n       --argument-names option is provided, the arguments are also assigned to\r\n       names specified in that option.\r\n\r\n       By using one of the event handler switches, a function can be made to\r\n       run automatically at specific events. The user may generate new events\r\n       using the emit builtin. Fish generates the following named events:\r\n\r\n       · fish_prompt, which is emitted whenever a new fish prompt is about to\r\n         be displayed.\r\n\r\n       · fish_command_not_found, which is emitted whenever a command lookup\r\n         failed.\r\n\r\n       · fish_preexec, which is emitted right before executing an interactive\r\n         command. The commandline is passed as the first parameter.\r\n\r\n       Note: This event will be emitted even if the command is invalid. The\r\n       commandline parameter includes the entire commandline verbatim, and may\r\n       potentially include newlines.\r\n\r\n       · fish_postexec, which is emitted right after executing an interactive\r\n         command. The commandline is passed as the first parameter.\r\n\r\n       Note: This event will be emitted even if the command is invalid. The\r\n       commandline parameter includes the entire commandline verbatim, and may\r\n       potentially include newlines.\r\n\r\n   Example\r\n       function ll\r\n           ls -l $argv\r\n       end\r\n\r\n       will run the ls command, using the -l option, while passing on any\r\n       additional files and switches to ls.\r\n\r\n       function mkdir -d 'Create a directory and set CWD'\r\n           command mkdir $argv\r\n           if test $status = 0\r\n               switch $argv[(count $argv)]\r\n                   case '-*'\r\n\r\n                   case '*'\r\n                       cd $argv[(count $argv)]\r\n                       return\r\n               end\r\n           end\r\n       end\r\n\r\n       This will run the mkdir command, and if it is successful, change the\r\n       current working directory to the one just created.\r\n\r\n       function notify\r\n           set -l job (jobs -l -g)\r\n           or begin; echo 'There are no jobs' >&; return 1; end\r\n\r\n           function _notify_job_$job --on-job-exit $job --inherit-variable job\r\n               echo -n \\a  # beep\r\n               functions -e _notify_job_$job\r\n           end\r\n       end\r\n\r\n       This will beep when the most recent job completes.\r\n\r\n\r\n~/.config/fish/functions/npm.fish (line 1): function npm -d \"javascript package manager\" -c npm -w npm\r\n    __fnm_run_bin_as \"npm\" $argv\r\n                                            ^\r\nfrom sourcing file ~/.config/fish/functions/npm.fish\r\n        called on standard input\r\n\r\nin command substitution\r\n        called on standard input\r\n\r\nfunction: Unknown option “-c”\r\n~/.config/fish/functions/npm.fish (line 1): function npm -d \"javascript package manager\" -c npm -w npm\r\n                                            ^\r\nfrom sourcing file ~/.config/fish/functions/npm.fish\r\n        called on standard input\r\n\r\nin command substitution\r\n        called on standard input\r\n\r\n\r\n       function -- create a function\r\n\r\n   Synopsis\r\n       function [OPTIONS] NAME; BODY; end\r\n\r\nfunction: Type “help function” for related documentation\r\n\r\nThe program 'npm' is currently not installed. You can install it by typing:\r\nsudo apt install npm\r\n```\r\n\r\nAfter running `node -v` one time, `npm` is available:\r\n\r\n```\r\nsash@localhost ~ [127]> node -v\r\nv7.0.0\r\nsash@localhost ~> npm\r\n\r\nUsage: npm <command>\r\n\r\nwhere <command> is one of:\r\n    access, adduser, bin, bugs, c, cache, completion, config,\r\n    ddp, dedupe, deprecate, dist-tag, docs, edit, explore, get,\r\n    help, help-search, i, init, install, install-test, it, link,\r\n    list, ln, login, logout, ls, outdated, owner, pack, ping,\r\n    prefix, prune, publish, rb, rebuild, repo, restart, root,\r\n    run, run-script, s, se, search, set, shrinkwrap, star,\r\n    stars, start, stop, t, tag, team, test, tst, un, uninstall,\r\n    unpublish, unstar, up, update, v, version, view, whoami\r\n\r\nnpm <cmd> -h     quick help on <cmd>\r\nnpm -l           display full usage info\r\nnpm help <term>  search for help on <term>\r\nnpm help npm     involved overview\r\n\r\nSpecify configs in the ini-formatted file:\r\n    /home/sash/.npmrc\r\nor on the command line via: npm <command> --key value\r\nConfig info can be viewed via: npm help config\r\n\r\nnpm@3.10.8 /home/sash/.config/fnm/lib/node_modules/npm\r\n```"},"comment":{"url":"https://api.github.com/repos/fisherman/fnm/issues/comments/259407151","html_url":"https://github.com/fisherman/fnm/issues/40#issuecomment-259407151","issue_url":"https://api.github.com/repos/fisherman/fnm/issues/40","id":259407151,"user":{"login":"jbucaran","id":56996,"avatar_url":"https://avatars.githubusercontent.com/u/56996?v=3","gravatar_id":"","url":"https://api.github.com/users/jbucaran","html_url":"https://github.com/jbucaran","followers_url":"https://api.github.com/users/jbucaran/followers","following_url":"https://api.github.com/users/jbucaran/following{/other_user}","gists_url":"https://api.github.com/users/jbucaran/gists{/gist_id}","starred_url":"https://api.github.com/users/jbucaran/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jbucaran/subscriptions","organizations_url":"https://api.github.com/users/jbucaran/orgs","repos_url":"https://api.github.com/users/jbucaran/repos","events_url":"https://api.github.com/users/jbucaran/events{/privacy}","received_events_url":"https://api.github.com/users/jbucaran/received_events","type":"User","site_admin":false},"created_at":"2016-11-09T12:49:00Z","updated_at":"2016-11-09T12:49:00Z","body":"@saschagehlich What's your fish --version?"}}
{"actor":{"display_login":"jbucaran"}}