diff --git a/index.js b/index.js index da61da7..54585a1 100644 --- a/index.js +++ b/index.js @@ -149,7 +149,7 @@ module.exports = function (args, opts) { continue; } - if (j === 0 && /[A-Za-z]/.test(letters[j]) && next[0] === '=') { + if (/[A-Za-z]/.test(letters[j]) && next[0] === '=') { setArg(letters[j], next.slice(1), arg); broken = true; break; diff --git a/test/kv_short.js b/test/kv_short.js index f3705c8..cb04b2a 100644 --- a/test/kv_short.js +++ b/test/kv_short.js @@ -22,9 +22,9 @@ test('short with embedded equals -k=a=b' , function (t) { t.deepEqual(argv, { k: 'a=b', _: [] }); }); -test('short with later equals is not kv like -ab=c' , function (t) { +test('short with later equals like -ab=c' , function (t) { t.plan(1); var argv = parse([ '-ab=c' ]); - t.deepEqual(argv, { a: true, b: '=c', _: [] }); + t.deepEqual(argv, { a: true, b: 'c', _: [] }); });