I have a TreeCompleter
(Scala code) which works as expected:
val treeCompleter = new TreeCompleter(
node("bindkey"),
node("cls"),
node(
"custom",
node("Option1", node("Param1", "Param2")),
node("Option2"),
node("Option3")
),
node("help"),
node("set"),
node("testkey"),
node("tput")
)
How can I obtain the collection of command names? For this example, those names are: bindkey
, cls
, custom
, help
, set
, testkey
and tput
.
The github project that contains the above code is here: https://github.com/mslinn/jline-example/blob/master/src/main/scala/CliLoop.scala
I don't care if the answer is in Java or Scala, thanks!