figiel / hosts

a libc wrapper providing per-user hosts file
Creative Commons Zero v1.0 Universal
65 stars 12 forks source link

Autocomplete #3

Open t3mpo opened 8 years ago

t3mpo commented 8 years ago

Autocomplete "complete -A hostname ssh rsh rcp telnet rlogin r ftp ping disk" don't work with custom hosts file, can fix this?

figiel commented 8 years ago

HI t3mpo, thanks for asking this question. I looked into issue and it seems the autocompletion for host-names is handled by bash internally via hostname action. It's thankfully configurable, please add following in your .bashrc, it should do the trick:

export HOSTFILE=$HOME/.hosts