Skip to content

Commit

Permalink
Declade sed_tmp and regex_tmp as arrays. Change _dwim_data_(sed|regex…
Browse files Browse the repository at this point in the history
…|exitstatus) from associate arrays to arrays.
  • Loading branch information
oknowton committed Jul 5, 2013
1 parent d2ae854 commit 1aa7df5
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions init.zsh
@@ -1,6 +1,6 @@
typeset -gA _dwim_data_regex
typeset -gA _dwim_data_sed
typeset -gA _dwim_data_exitstatus
typeset -ga _dwim_data_regex
typeset -ga _dwim_data_sed
typeset -ga _dwim_data_exitstatus

if [[ $DWIM_REGEX_CMD == "" ]]; then
if (( $+commands[gsed] )); then
Expand Down Expand Up @@ -35,9 +35,14 @@ _dwim_prepend_transform() {
_dwim_add_transform() {
local regex_tmp
local sed_tmp
regex_tmp=($_dwim_data_regex)
sed_tmp=($_dwim_data_sed)
local i

typeset -a regex_tmp
typeset -a sed_tmp

regex_tmp=($_dwim_data_regex)
sed_tmp=($_dwim_data_sed)

_dwim_data_regex=()
_dwim_data_regex[1]="$1"
for i in {1..${#regex_tmp}}; do
Expand Down

0 comments on commit 1aa7df5

Please sign in to comment.