shell-quote
Advanced tools
Comparing version 1.6.0 to 1.6.1
@@ -18,3 +18,3 @@ var json = typeof JSON !== undefined ? JSON : require('jsonify'); | ||
else { | ||
return String(s).replace(/([\\$`()!#&*|])/g, '\\$1'); | ||
return String(s).replace(/([#!"$&'()*,:;<=>?@\[\\\]^`{|}])/g, '\\$1'); | ||
} | ||
@@ -21,0 +21,0 @@ }).join(' '); |
{ | ||
"name": "shell-quote", | ||
"version": "1.6.0", | ||
"version": "1.6.1", | ||
"description": "quote and parse shell commands", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -14,11 +14,12 @@ var test = require('tape'); | ||
); | ||
t.equal(quote([]), ''); | ||
t.equal(quote(["a\nb"]), "'a\nb'"); | ||
t.equal(quote([' #(){}*|][!']), "' #(){}*|][!'"); | ||
t.equal(quote(["'#(){}*|][!"]), '"\'#(){}*|][\\!"'); | ||
t.equal(quote(["X#(){}*|][!"]), "X\\#\\(\\){}\\*\\|][\\!"); | ||
t.equal(quote(["a\n#\nb"]), "'a\n#\nb'"); | ||
t.equal(quote([ 'a', 1, true, false ]), 'a 1 true false'); | ||
t.equal(quote([ 'a', 1, null, undefined ]), 'a 1 null undefined'); | ||
t.end(); | ||
t.equal(quote([]), ''); | ||
t.equal(quote(["a\nb"]), "'a\nb'"); | ||
t.equal(quote([' #(){}*|][!']), "' #(){}*|][!'"); | ||
t.equal(quote(["'#(){}*|][!"]), '"\'#(){}*|][\\!"'); | ||
t.equal(quote(["X#(){}*|][!"]), "X\\#\\(\\)\\{\\}\\*\\|\\]\\[\\!"); | ||
t.equal(quote(["a\n#\nb"]), "'a\n#\nb'"); | ||
t.equal(quote(['><;{}']), '\\>\\<\\;\\{\\}'); | ||
t.equal(quote([ 'a', 1, true, false ]), 'a 1 true false'); | ||
t.equal(quote([ 'a', 1, null, undefined ]), 'a 1 null undefined'); | ||
t.end(); | ||
}); | ||
@@ -25,0 +26,0 @@ |
21944
395