Fixes #14, setopts appropriately if in a zsh shell (#17)
Fixes #14, setopts appropriately if in a zsh shell (#17)

* Fixes #14, setopts appropriately if in a zsh shell

`setopt KSH_ARRAYS` enables 0 indexing arrays, needed for compat
with bash as opposed to zsh native 1 indexed arrays.

Also for `setopt BASH_REMATCH`: see [1]
> If the option BASH_REMATCH is set the array BASH_REMATCH
> is set to the substring that matched the pattern followed
> by the substrings that matched parenthesised subexpressions
> within the pattern.

[1] http://zsh.sourceforge.net/Doc/Release/Conditional-Expressions.html

* isolates zsh options scope

We isolate the scope of zsh options by setting them inside
a function with the LOCAL_OPTIONS[1] set so that KSH_ARRAYS
and BASH_REMATCH will not conflict with any existing settings.

See #17 for details.

[1] http://zsh.sourceforge.net/Doc/Release/Options.html#index-LOCALOPTIONS

hermanjunge/kubernetes-digitalocean-terraform,kubernetes-digitalocean-terraform/kubernetes-digitalocean-terraform,nomkhonwaan/kubernetes-digitalocean-terraform