|
|
@@ -350,7 +350,7 @@ func colorizeCandidate(s string) string {
|
|
|
"address", "route", "dhcp-client", "dhcp-server", "dns", "firewall", "service",
|
|
|
"filter", "nat", "mangle", "address-list", "bgp", "ospf", "port", "peers", "lease", "network", "cache", "static", "rule", "table", "instance", "area", "neighbor", "resource", "identity":
|
|
|
return ColorCyan + s + ColorReset
|
|
|
- case "api", "api-ssl", "ftp", "ssh", "telnet", "web", "web-ssl":
|
|
|
+ case "www", "ssh", "telnet", "web":
|
|
|
return ColorMagenta + s + ColorReset
|
|
|
default:
|
|
|
return ColorWhite + s + ColorReset
|
|
|
@@ -406,7 +406,14 @@ func (c *Completer) buildCommandTree() *Node {
|
|
|
|
|
|
// Helper for services
|
|
|
dynServices := func() []string {
|
|
|
- return []string{"api", "api-ssl", "ftp", "ssh", "telnet", "web", "web-ssl"}
|
|
|
+ if c.executor != nil && c.executor.servicesMgr != nil {
|
|
|
+ var names []string
|
|
|
+ for _, s := range c.executor.servicesMgr.ListServices() {
|
|
|
+ names = append(names, s.Name)
|
|
|
+ }
|
|
|
+ return names
|
|
|
+ }
|
|
|
+ return []string{"www", "telnet", "ssh"}
|
|
|
}
|
|
|
|
|
|
// Common standard actions
|