From 6bbe14529166245e86424f220a2321442fe88dc3 Mon Sep 17 00:00:00 2001 From: James Halliday Date: Mon, 24 Aug 2015 08:52:29 -0500 Subject: [PATCH] kv short fix --- index.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index bc346cb..6a0559d 100644 --- a/index.js +++ b/index.js @@ -140,6 +140,12 @@ module.exports = function (args, opts) { continue; } + if (/[A-Za-z]/.test(letters[j]) && /=/.test(next)) { + setArg(letters[j], next.split('=')[1], arg); + broken = true; + break; + } + if (/[A-Za-z]/.test(letters[j]) && /-?\d+(\.\d*)?(e-?\d+)?$/.test(next)) { setArg(letters[j], next, arg); @@ -148,7 +154,7 @@ module.exports = function (args, opts) { } if (letters[j+1] && letters[j+1].match(/\W/)) { - setArg(letters[j], arg.slice(j+3), arg); + setArg(letters[j], arg.slice(j+2), arg); broken = true; break; }