mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 18:57:17 -07:00
misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
parent
6eb3352f8b
commit
4e7377d2a0
1 changed files with 9 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue