cli: shorten hostnames

Make cli output less verbose by trimming search domains from hostnames.