a party club for your host mappings
make a backup of /etc/hosts.
install with conscript
$ cs softprops/hostclub
$ hc <command> <options>
Commands:
map, unmap, clear, aliases, alias, host, ip, ls, help, swap, completion
You may substitute an alias anywhere an ip is expected.
Maps a hostname to an ip
$ hc map foo.com 127.0.0.1
Unmaps a hostname
$ hc unmap foo.com
Clears all managed host mappings
$ hc clear
Lists all current aliases
$ hc aliases
Stores an alias for a given ip
$ hc alias name ip
$ hc alias name
Shows ip mapped to host
$ hc host foo.com
Lists hosts mapped to ip
$ hc ip 127.0.0.1
Swaps two ips.
$ hc swap 127.0.0.1 192.168.0.10
Lists managed host mappings
$ hc ls
Shows help info
$ hc help
Experimental bash completion integration
$ hc completion >> ~/.profile
This will enable tab completion of most commands
Doug Tangren (softprops) 2013