cli: shorten hostnames

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