Skip to content
Snippets Groups Projects
Verified Commit 5aeb4328 authored by orestis.malaspin's avatar orestis.malaspin
Browse files

trying with set and calling the function

parent bab27e23
No related branches found
No related tags found
1 merge request!8Draft: Resolve "Add bash completion helper function"
Pipeline #29322 failed
......@@ -44,7 +44,8 @@ class CommanderApp {
this.registerCommands();
AutoCompletionHelper.getCommands(this.program)
AutoCompletionHelper.buildTree(this.program)
// AutoCompletionHelper.getCommands(this.program)
this.program.parse();
}
......
......
import { Options } from 'boxen';
import { Command } from 'commander';
// #/usr/bin/env bash
......@@ -163,6 +162,7 @@ class AutoCompletionHelper {
let tree = new Tree(root.name(), root.commands.map((sc) => this.getSubTree(sc, root)))
this.printTree(tree, 0)
console.log(this.flatten(tree))
console.log(new Set(this.flatten(tree)))
console.log(this.search(tree, [], "login"))
return tree
}
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment