Comparing version 0.1.33 to 0.1.34
@@ -6,3 +6,3 @@ var fs = require('fs'), | ||
breakUpCommand = require('./util/break-up-command'), | ||
escapeSpaces = require('./util/escape-spaces'), | ||
escapeShell = require('./util/escape-shell'), | ||
firstWord = require('./util/first-word'), | ||
@@ -200,9 +200,9 @@ extractJs = require('./util/extract-js'), | ||
possibilities.directories.forEach(function (v) { | ||
ret.push(escapeSpaces(v) + '/'); | ||
ret.push(escapeShell(v) + '/'); | ||
}); | ||
possibilities.files.forEach(function (v) { | ||
ret.push(escapeSpaces(v) + ' '); | ||
ret.push(escapeShell(v) + ' '); | ||
}); | ||
possibilities.executables.forEach(function (v) { | ||
ret.push(escapeSpaces(v) + ' '); | ||
ret.push(escapeShell(v) + ' '); | ||
}); | ||
@@ -209,0 +209,0 @@ possibilities.js.forEach(function (v) { |
var fs = require('fs'), | ||
path = require('path'), | ||
escapeRegExp = require('../util/escape-regexp'), | ||
escapeSpaces = require('../util/escape-spaces'), | ||
inJavaScript = require('../util/in-javascript'), | ||
@@ -6,0 +5,0 @@ extractJs = require('../util/extract-js'), |
{ | ||
"name": "jsh", | ||
"version": "0.1.33", | ||
"version": "0.1.34", | ||
"description": "The JavaScript shell interpreter.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -36,3 +36,3 @@ var vm = require('vm'), | ||
addNewlines = require('../lib/util/add-newlines'), | ||
escapeSpaces = require('../lib/util/escape-spaces'), | ||
escapeShell = require('../lib/util/escape-shell'), | ||
stripSemicolon = require('../lib/util/strip-semicolon'), | ||
@@ -74,4 +74,5 @@ breakUpCommand = require('../lib/util/break-up-command'), | ||
}); | ||
it('should escape spaces', function () { | ||
expect(escapeSpaces('vim file')).to.equal('vim\\ file'); | ||
it('should escape shell commands', function () { | ||
expect(escapeShell('vim file')).to.equal('vim\\ file'); | ||
expect(escapeShell('Edge of Tomorrow (2014) [1080p]/')).to.equal('Edge\\ of\\ Tomorrow\\ \\(2014\\)\\ \\[1080p\\]/') | ||
}); | ||
@@ -78,0 +79,0 @@ it('should break up a command into parts', function () { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
140522