* Validate modified code using Shellcheck & Strict Bash
* Added and/or elaborated more comments
* scanlist() should exit if /etc/pihole is not available
* Add `export LC_CTYPE=C` to prevent extreme grep slowdown
* Consider "domain.com#comment" an exact match
* Add specialised wildcard searching grep
* Optimise and simplify queryFunc() for readability
* Replace IDN `python` parsing with `idn2`, as `python` is not guaranteed to be available
* Use ${COL_BOLD} when printing filenames
* Make colfile readonly, and use path of PI_HOLE_SCRIPT_DIR
* Rename piholeStatus function to statusFunc for function name consistency
* Replace superseded netstat command with nc
* Perform addn-hosts check using a single grep subshell
* Fix queryFunc if adlists URLs have been removed
* Allow for -adlists command line switch (where the "s" is a typo)
* Add error message when unable to find associated adlists URL
* Provide PR fix on current dev version
* Add blResult variable for white/black match
* Supporting Block Page queryFunc fixes
* Re-add unmerged lines
* Only attempt to install FTL if branch was found
* ~~corebranches~~ webbranches (web branches now actually listed)
Signed-off-by: Adam Warner <adamw@rner.email>
* User-friendly queryFunc() output
* Silence grep errors
* Provide 'pihole -q -h' help output
* Rewrite option handling
* Loop through grep stdout to make query output user friendly
* Add -adlist option to show block list URL instead of internal file name
* Limit general searches to 10 matches per block list
* Add -all option to override 10 match limit
* Fixed 'pihole -h' wording
* Further query optimisations
* Optimised scanList() output by switching folder
* Re-added processWildcards() function
* Added "-bp" exact matching option for use with block page
* Standardised query output
* Separated wildcard search from blacklist/whitelist search
* Optimised sorting by sorting glob output and not scanList() output
* Fixed result skipping
* Add text for wildcard result on exact query
* Fix wildcard result output
* Multiple wildcard matches on exact query could cause unexpected output
* Remove unnecessary replacement
* Make grep only output matching text
* HOSTS format lists will also output the IP address
* That substitution was necessary
* Remove IP address from HOSTS format lists
* Filter unwanted content
* Add /dev/null to grep, to always print file name (even when searching only one block list)
* Use three seds to remove unwanted content from block lists
* Merge with development
* Simplify queryFunc code