From 3087e1d65e2448a230a9b3187c23eabc24829267 Mon Sep 17 00:00:00 2001 From: Benjamin Date: Tue, 19 Dec 2017 21:11:40 -0800 Subject: [PATCH] fix: implement @antoniom's fix for camel-case expansion --- index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 18656496..599f18ee 100644 --- a/index.js +++ b/index.js @@ -635,10 +635,10 @@ function parse (args, opts) { flags.aliases[key].concat(key).forEach(function (x) { if (/-/.test(x) && configuration['camel-case-expansion']) { var c = camelCase(x) - if (flags.aliases[key].indexOf(c) === -1) { + if (c !== key && flags.aliases[key].indexOf(c) === -1) { flags.aliases[key].push(c) + newAliases[c] = true } - newAliases[c] = true } }) flags.aliases[key].forEach(function (x) {