mirror of
https://github.com/octoleo/hosts.git
synced 2024-05-31 05:30:47 +00:00
124520efc4
Displaying a record pair for a hostname or IP address is likely a common operation, and using the `show` name makes it clear what the primary function of the command is. Since record pairs are very simple, the easiest way to allow both hostname and ip address arguments is to use grep, which also provides general search-like functionality. In order to avoid doubling this functionality, use the `show` command in the `list` command for search.
35 lines
651 B
Markdown
35 lines
651 B
Markdown
# Hosts
|
|
|
|
A command line program with shortcuts for managing hosts file entries.
|
|
|
|
## Usage
|
|
|
|
Usage:
|
|
hosts add <ip> <hostname>
|
|
hosts remove <hostname>
|
|
hosts list [<search string>]
|
|
hosts show ( <ip> | <hostname> | <search string> )
|
|
hosts edit
|
|
hosts file
|
|
|
|
For full usage, run:
|
|
|
|
hosts help
|
|
|
|
or
|
|
|
|
hosts help <command name>
|
|
|
|
## Acknowledgements
|
|
|
|
Based on prior work by:
|
|
|
|
- https://github.com/nddrylliog
|
|
- https://gist.github.com/nddrylliog/1368532
|
|
- https://github.com/dfeyer
|
|
- https://gist.github.com/dfeyer/1369760
|
|
|
|
Original idea and interface (since changed) via:
|
|
|
|
https://github.com/macmade/host-manager
|