Artificial intelligent assistant

Bash Auto-Completion feature for SSHing into Different Hosts I have big list of servers which I normally `ssh` to all the time. Is there any way using `bash` or `zsh` so that I can keep the list of hostname and bash auto-completion goes through the file and gives me suggestion for the boxes starting with those letters whenever I type the first few letters of the hostname.

`Zsh` completion works with so called ssh bookmarks. These are per host configurations in `~/.ssh/config`.

For example,


host baz
hostname 192.168.1.2
port 22
user warrick

host bar
hostname example.com
port 2200
user kevin
identityfile /home/warrick/.ssh/ec2.pem


`man ssh_config` to see a full list of options.

**EDIT**

I am using the completion script from ohmyzsh:

<

In similiar style to `ohmyzsh`, I placed the above script into `~/.zsh/libs/completion.zsh` and added this to `~/.zshrc`.


# ~/.zshrc
for f in ~/.zsh/libs/*; do
source $f
done

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy c7ca13de4dc3a9ac12889399d9bbb600