misc: small fix or general refactoring i did not bother commenting

This commit is contained in:
evilsocket 2018-08-25 11:42:24 +02:00
commit 4e7377d2a0
No known key found for this signature in database
GPG key ID: 1564D7F30393A456

View file

@ -50,6 +50,15 @@ func (s *Session) setupReadline() (err error) {
}
}
for root, subElems := range tree {
item := readline.PcItem(root)
item.Children = []readline.PrefixCompleterInterface{}
for _, child := range subElems {
item.Children = append(item.Children, readline.PcItem(child))
}
prefixCompleters = append(prefixCompleters, item)
}
history := ""
if !*s.Options.NoHistory {
history, _ = core.ExpandPath(HistoryFile)