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

271 Commits

Author SHA1 Message Date
William Melody
5759ade2eb Add brew tap command to brew install in Readme. 2015-06-29 19:58:17 -07:00
William Melody
94ca8bfb57 Make sed operations in remove only match exact column matches.
In order to make editing more precise, sed regular expressions only
match exact occurrences of the search string within each entry column.

In order to properly handle tab and space separators in a portable
manner, a set of global variables are included that provide strings
of those characters.
2015-06-28 22:09:46 -07:00
William Melody
46dcff947c Bump version to 1.4.3 2015-06-28 22:08:29 -07:00
William Melody
41a84bd0ed Uppercase $_USE_DEBUG reference in _debug
This variable was uppercased in a09d0fc but this occurrence was missed.
2015-06-28 17:32:42 -07:00
William Melody
5a1ffa3498 Bump version 1.4.2
package.json was missed in c80287f
2015-06-27 20:51:45 -07:00
William Melody
c80287f2bf Bump version to 1.4.2 2015-06-27 20:49:06 -07:00
William Melody
fa920b0a97 Use local keyword more consistently. 2015-06-27 20:47:36 -07:00
William Melody
a09d0fc893 Update boilerplate to reflect latest updates from source. 2015-06-27 20:43:19 -07:00
William Melody
8b0fc0fcfe Quote command names passed as arguments to desc 2015-06-27 20:33:11 -07:00
William Melody
d2b92aec5a Prefer newlines instead of semicolons. 2015-06-27 20:31:26 -07:00
William Melody
66edbfd03c Update _debug and _die comments. 2015-06-27 20:21:58 -07:00
William Melody
3cfa2c8cf9 Use simpler $IFS setting. 2015-06-27 20:17:41 -07:00
William Melody
2693c62693 Bump version to 1.4.1 2015-06-25 17:19:23 -07:00
William Melody
02a87b0938 Add optional extension argument to sed -i calls
BSD sed requires the optional exention argument for the -i option, while
in GNU sed it's optional. Including a blank extension for portability.
2015-06-25 17:17:12 -07:00
William Melody
13d1428ee9 Add large ascii text of name to Readme 2015-05-20 20:31:05 -07:00
William Melody
d5b6456766 Bump version to 1.4.0 2015-05-20 16:49:46 -07:00
William Melody
db2b5ad074 Add expanded installtion instructions to Readme
Include command for manual and bpkg installation methods.
2015-05-20 16:48:08 -07:00
William Melody
371b644f6f Add package.json for bpkg 2015-05-20 16:47:32 -07:00
William Melody
87bce12994 Add basic Makefile
This simply installs the script to /usr/local/bin
2015-05-20 16:46:02 -07:00
William Melody
08d899fee5 Fix inert indentation typo. 2015-04-28 16:54:25 -07:00
William Melody
9a395fd017 Bump version to 1.3.0 2015-04-18 21:23:45 -07:00
William Melody
26ad499fee Spelling correction: formmatted_comment -> formatted_comment 2015-04-18 21:21:46 -07:00
William Melody
2c83de9dff Declare and assign separately to avoid masking return values.
ShellCheck SC2155

https://github.com/koalaman/shellcheck/wiki/SC2155
2015-04-18 21:17:46 -07:00
William Melody
cb9e20e554 Use capitalized form of $_ME variable.
The capitalized version of this variable makes it easier to override,
even though this is not technically part of the external API. There is
no known downside of using the capitalized version of the variable.
2015-04-18 21:06:26 -07:00
William Melody
e62bede843 Bump version to 1.2.0 2015-03-20 18:11:42 -07:00
William Melody
c2ca24b459 Verify that matching records have been found in remove before removing 2015-03-20 18:10:51 -07:00
William Melody
312f5909fa Add ability to add an option comment when adding a record
This addition requires a number of changes including:

- the addition of a new `_join` function
- reformatting of the `add` function to facilitate the longer lines
2015-03-20 18:06:00 -07:00
William Melody
023aa0503f Add enabled and disabled to command list in --help 2015-03-20 17:23:31 -07:00
William Melody
f10be24da7 Bump version to 1.1.0 2015-03-20 16:49:24 -07:00
William Melody
7e32a799c2 Add enabled and disabled commands.
Both of these are just aliases for the `list ( enabled | disabled )`
commands, providing a shorter way to access the same functionality.
2015-03-20 16:49:08 -07:00
William Melody
52529dd029 Correct typo in help usage + add info about --force in Readme 2015-03-19 17:14:04 -07:00
William Melody
e6ee93da47 Add command information to Readme 2015-03-19 14:43:32 -07:00
William Melody
0830fa43b8 Simplify "strict mode" section in order to avoid too much noise
These comments can be found in the bash-boilerplate project and aren't
necessary here. Since the $DEFAULT_IFS doesn't appear to be used,
either, the $IFS setting can be reduced to a since simple assignment.
2015-03-19 14:30:51 -07:00
William Melody
bcf308ffd3 Bump version to 1.0.0 2015-03-18 18:45:00 -07:00
William Melody
531594f74f Add 'Why' section to Readme 2015-03-18 18:44:06 -07:00
William Melody
db5cf5a97b Use more consistent spacing in usage statements. 2015-03-18 18:41:04 -07:00
William Melody
2ab32d006a Add license 2015-03-18 18:39:22 -07:00
William Melody
cf56224732 Add installation information to Readme. 2015-03-18 18:35:45 -07:00
William Melody
b5a2b28884 Remove redundant command usage entry in help 2015-03-18 18:28:38 -07:00
William Melody
37e9618359 Clarify help command usage in Readme. 2015-03-18 18:23:59 -07:00
William Melody
5844aa19a3 Use 'search string' consistently instead of mixing with 'search term' 2015-03-18 18:22:37 -07:00
William Melody
4d8c9a3385 Prompt user in remove
In order to avoid mistakes, prompt the user when removing records. Allow
skipping of the prompt using the --force option.
2015-03-18 18:20:24 -07:00
William Melody
00e94c8042 Verify write permissions before running write commands
When the user doesn't have write permissions, display a helpful error
message.
2015-03-18 18:02:09 -07:00
William Melody
a330d17862 Add $HOSTS_PATH variable
This variable makes it possible to configure the hosts path to something
other than /etc/hosts.
2015-03-18 17:47:20 -07:00
William Melody
bc36182773 Print disabled matches in show 2015-03-18 17:41:04 -07:00
William Melody
522d189f2e Update help with latest usage information. 2015-03-18 17:25:34 -07:00
William Melody
10704e2bd7 Use $DEFAULT_COMMAND pattern from bash-boilerplate
This is more verbose, but consistent with bash-boilerplate's approach.
2015-03-18 17:23:15 -07:00
William Melody
8889e26255 Run the list command by default when no command is provided 2015-03-18 17:13:25 -07:00
William Melody
e9dec32c90 Display disabled records in list when present
When disabled records are present, include them in a new section in the
default output of `list`. If no disabled records are present, don't
include the section.
2015-03-18 17:10:21 -07:00
William Melody
7d8a94d4ca Add 'enabled' and 'disabled' options to list
These return records that have the status specified in the option.
2015-03-18 17:05:33 -07:00