From 72de3d21b60e4f4cda2f215253a555cf46de92f2 Mon Sep 17 00:00:00 2001 From: Robert Liebowitz Date: Fri, 15 Dec 2017 05:39:12 -0500 Subject: [PATCH] Remove instances of incorrect command completion --- lib/utils/autocomplete.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/utils/autocomplete.js b/lib/utils/autocomplete.js index 408135a9d..67ef89e38 100644 --- a/lib/utils/autocomplete.js +++ b/lib/utils/autocomplete.js @@ -14,7 +14,11 @@ const tab = require('tabtab')({ name }); const getSugestions = (commands) => { tab.on(name, (data, done) => { - done(null, Object.keys(commands)); + if (data.words === 1) { + done(null, Object.keys(commands)); + } else { + done(null, []); + } }); Object.keys(commands).forEach(command => {