Remove instances of incorrect command completion

This commit is contained in:
Robert Liebowitz 2017-12-15 05:39:12 -05:00
parent b4d19dcd1a
commit 72de3d21b6

View File

@ -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 => {