Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Improved code comments a bit.

  • Loading branch information...
commit 8a8f4f737bdc0c98f579e009bf1f161441db817f 1 parent 5d5648b
@deestan authored
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/install.js
View
6 lib/install.js
@@ -50,8 +50,10 @@ install.completion = function (opts, cb) {
}
if (/\//.test(opts.partialWord)) {
- // Complete fully to folder if there is exactly one match and
- // it is a folder containing a package.json file.
+ // Complete fully to folder if there is exactly one match and it
+ // is a folder containing a package.json file. If that is not the
+ // case we return 0 matches, which will trigger the default bash
+ // complete.
var lastSlashIdx = opts.partialWord.lastIndexOf("/")
var partialPath = opts.partialWord.slice(0, lastSlashIdx)
if (partialPath === "")
Please sign in to comment.
Something went wrong with that request. Please try again.