1
0
mirror of https://github.com/octoleo/hosts.git synced 2024-11-11 07:40:56 +00:00
Commit Graph

10 Commits

Author SHA1 Message Date
William Melody
7919b171fe Fix typo in README.md. 2017-03-01 16:26:58 -08:00
William Melody
c3cee7c65d Simplify README.md links. 2017-03-01 16:24:10 -08:00
William Melody
99b175f134 Add --auto-sudo option and expand option documentation.
Using `sudo` within a script is generally considered poor practice, so
by default an error message is printed when the user attempts to perform
a write operation without sufficient permissions.

One way to deal avoid this error message is to alias `hosts` to `sudo
hosts`, but this then requires `sudo` for all operations and not just
write operations.

The new `--auto-sudo` option flag provides a way to automatically invoke
a write command with `sudo` when the user doesn't have write
permissions.

In order to provide cleaner documentation for this option, include more
option documentation in README.md.
2017-03-01 16:18:05 -08:00
William Melody
0bb87f92fe Expand help documentation in README.md
Output formatted to markdown with:

    for __command in "$(hosts commands --raw)"
    do
      printf "### \`hosts %s\`\n" "${__command}"
      printf "\n"
      printf "\`\`\`text\n"
      hosts help "${__command}"
      printf "\`\`\`\n"
      printf "\n"
    done
2017-03-01 14:02:17 -08:00
William Melody
347189c059 Add search usage to primary help output.
Update README.md to more accurately reflect `help` output.
2017-03-01 13:45:19 -08:00
William Melody
265a1c732e Add block and unblock functions.
`block` and `unblock` set the given <hostname> to the IPv4 and IPv6
loopback addresses.
2017-03-01 13:43:10 -08:00
William Melody
e8fa0d8ac8 Fix typos in README.md. 2017-03-01 12:49:36 -08:00
William Melody
73ffcffb38 Add hosts search function.
`hosts search` wraps `hosts list`, providing a slightly more intuitive
interface.
2017-03-01 12:46:27 -08:00
William Melody
e9f3dc5431 Add "Tests" section to README.md. 2017-03-01 12:15:16 -08:00
William Melody
f4ebb9468a Rename "Readme.md" to "README.md". 2017-03-01 11:39:43 -08:00