Hostnames containing a hyphen now get surrounded by square brackets.
This has one limitation: [host-foo],service_x- does not complete, though services containing a hyphen ([ser-vice]).
Fix: version check for counter support.
Move hostname completion to dedicated function.