The data contained in this repository can be downloaded to your computer using one of several clients.
Please see the documentation of your version control software client for more information.
Please select the desired protocol below to get the URL.
This URL has Read-Only access.
main_repo / deps / npm / html / doc / completion.html @ 5aef65a9
History | View | Annotate | Download (1.97 KB)
1 |
<!doctype html>
|
---|---|
2 |
<html>
|
3 |
<title>completion</title> |
4 |
<meta http-equiv="content-type" value="text/html;utf-8"> |
5 |
<link rel="stylesheet" type="text/css" href="../static/style.css"> |
6 |
|
7 |
<body>
|
8 |
<div id="wrapper"> |
9 |
<h1><a href="../doc/completion.html">completion</a></h1> <p>Tab Completion for npm</p> |
10 |
|
11 |
<h2 id="SYNOPSIS">SYNOPSIS</h2> |
12 |
|
13 |
<pre><code>. <(npm completion)</code></pre> |
14 |
|
15 |
<h2 id="DESCRIPTION">DESCRIPTION</h2> |
16 |
|
17 |
<p>Enables tab-completion in all npm commands.</p> |
18 |
|
19 |
<p>The synopsis above
|
20 |
loads the completions into your current shell. Adding it to |
21 |
your ~/.bashrc or ~/.zshrc will make the completions available |
22 |
everywhere.</p>
|
23 |
|
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>
|
27 |
|
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>
|
31 |
|
32 |
<h2 id="SEE-ALSO">SEE ALSO</h2> |
33 |
|
34 |
<ul><li><a href="../doc/developers.html">developers(1)</a></li><li><a href="../doc/faq.html">faq(1)</a></li><li><a href="../doc/npm.html">npm(1)</a></li></ul> |
35 |
</div>
|
36 |
<p id="footer">completion — npm@1.2.10</p> |
37 |
<script>
|
38 |
;(function () {
|
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]/)
|
44 |
&& el.id
|
45 |
})
|
46 |
var l = 2
|
47 |
, toc = document.createElement("ul")
|
48 |
toc.innerHTML = els.map(function (el) {
|
49 |
var i = el.tagName.charAt(1)
|
50 |
, out = ""
|
51 |
while (i > l) {
|
52 |
out += "<ul>"
|
53 |
l ++
|
54 |
}
|
55 |
while (i < l) {
|
56 |
out += "</ul>"
|
57 |
l --
|
58 |
}
|
59 |
out += "<li><a href='#" + el.id + "'>" +
|
60 |
( el.innerText || el.text || el.innerHTML)
|
61 |
+ "</a>"
|
62 |
return out
|
63 |
}).join("\n")
|
64 |
toc.id = "toc"
|
65 |
document.body.appendChild(toc)
|
66 |
})()
|
67 |
</script>
|
68 |
</body></html> |