3 <title>npm-completion</title>
4 <meta http-equiv="content-type" value="text/html;utf-8">
5 <link rel="stylesheet" type="text/css" href="../../static/style.css">
9 <h1><a href="../cli/npm-completion.html">npm-completion</a></h1> <p>Tab Completion for npm</p>
11 <h2 id="SYNOPSIS">SYNOPSIS</h2>
13 <pre><code>. <(npm completion)</code></pre>
15 <h2 id="DESCRIPTION">DESCRIPTION</h2>
17 <p>Enables tab-completion in all npm commands.</p>
20 loads the completions into your current shell. Adding it to
21 your ~/.bashrc or ~/.zshrc will make the completions available
24 <p>You may of course also pipe the output of npm completion to a file
25 such as <code>/usr/local/etc/bash_completion.d/npm</code> if you have a system
26 that will read that file for you.</p>
28 <p>When <code>COMP_CWORD</code>, <code>COMP_LINE</code>, and <code>COMP_POINT</code> are defined in the
29 environment, <code>npm completion</code> acts in "plumbing mode", and outputs
30 completions based on the arguments.</p>
32 <h2 id="SEE-ALSO">SEE ALSO</h2>
34 <ul><li><a href="../misc/npm-developers.html">npm-developers(7)</a></li><li><a href="../misc/npm-faq.html">npm-faq(7)</a></li><li><a href="../cli/npm.html">npm(1)</a></li></ul>
36 <p id="footer">npm-completion — npm@1.3.17</p>
39 var wrapper = document.getElementById("wrapper")
40 var els = Array.prototype.slice.call(wrapper.getElementsByTagName("*"), 0)
41 .filter(function (el) {
42 return el.parentNode === wrapper
43 && el.tagName.match(/H[1-6]/)
47 , toc = document.createElement("ul")
48 toc.innerHTML = els.map(function (el) {
49 var i = el.tagName.charAt(1)
59 out += "<li><a href='#" + el.id + "'>" +
60 ( el.innerText || el.text || el.innerHTML)
65 document.body.appendChild(toc)