- 1 Vapor IO Brings OpenDCRE to General Availability
- 2 VMware Takes the Wraps Off vRealize Automation and vRealize Business
- 3 Microsoft Previews Hyper-V Containers for Windows Server 2016
- 4 Mirantis Led FUEL Project Gets Installed Under OpenStack Big Tent
- 5 Red Hat Enterprise Linux 7.2 Adds Security, DR Features
Host Completion in bash
bash has programmable parameter completion, so you could set hostname completion up by coding it yourself. That's not necessary, though. Instead, you can pick up the bash completion files (also available as the bash-completion package in RH, Debian and from Darwin Ports for Mac OS X).
Once you've installed that, type:
This takes information from your .ssh/known_hosts file. It works automatically for ssh and similar commands, but you can also set other commands to use it. For example, maybe you have a script called 'update' which updates a particular host. Type:
complete -F _known_hosts update
To investigate programmable completion options more, complete -p will list all the currently available completions.