Hello Bart, Thanks a lot for responding. I find your comments very informative and a treasure trove for me. > Some brief critique: > > (1) It's annoying to use application/octet-stream for text attachments. > This probably isn't your fault, you just have a broken email program, > or you haven't told it that the ".zsh" extension means a text type. gmail is adding application/octet-stream. I will send both the .zsh file and a .txt file. > (2) In this line in list-completion: > > if ((compstate[list_lines] > ${INCR_MAX_MATCHES:-20} \ > || compstate[list_lines]+BUFFERLINES+2 > LINES)) > > The backslash-continuation is not necessary, "((" begins a syntactic > construct which continues even across newlines to the matching "))". On a slightly different note, I do not feel comfortable using the (( .. )) construct as it does not show up properly in the xtrace/verbose log. This is how it shows up. +limit-completion:21> (( compstate[list_lines] > 60 || compstate[list_lines]+BUFFERLINES+2 > LINES )) whereas the [[ .. ]] construct shows up like this: +limit-completion:23> [[ 7 -gt 60 ||+limit-completion:23> expr 7 + 2 + 2 +limit-completion:23> [[ 7 -gt 60 || 11 -gt 47 ]] I think the [[ .. ]] is more comprehensible. > setopt localoptions; unsetopt BANG_HIST > > However, locally unsetting BANG_HIST is the correct solution to the > problem you were having, so good job figuring that out. Fixed it. I picked the above localoptions from your earlier code on _debug_widget. I could not figure out why the below lines do not work. They return a blank. echo "4: $(expr ${compstate[list_lines]})" echo "5: $(expr $compstate[list_lines])" echo "6: $(expr $compstate[list_lines] + $BUFFERLINES)" echo "7: $(expr $compstate[list_lines] + $BUFFERLINES + 2)" They are in lines 42 .. 45 of the attached script. The debugging output from the lines 35 .. 57 of the attached file is: +limit-completion:7> echo 'started limit-completion' started limit-completion +limit-completion:8> echo 'compstate[list_lines]: 8' compstate[list_lines]: 8 +limit-completion:9> echo 'INCR_MAX_MATCHES: 60' INCR_MAX_MATCHES: 60 +limit-completion:10> echo 'BUFFERLINES: 2' BUFFERLINES: 2 +limit-completion:11> echo 'list_lines: 8' list_lines: 8 +limit-completion:12> expr 8 + 2 + 2 +limit-completion:12> echo 'expr list_lines: 12' expr list_lines: 12 +limit-completion:13> echo '----- no idea why these below lines do not work' ----- no idea why these below lines do not work +limit-completion:14> echo '4: ' 4: +limit-completion:15> echo '5: ' 5: +limit-completion:16> echo '6: ' 6: +limit-completion:17> echo '7: ' 7: +limit-completion:18> echo '----- no idea why the above lines do not work' ----- no idea why the above lines do not work +limit-completion:19> echo 'LINES: 47' LINES: 47 +limit-completion:20> echo 'ended limit-completion' ended limit-completion +limit-completion:23> [[ 8 -gt 60 ||+limit-completion:23> expr 8 + 2 + 2 +limit-completion:23> [[ 8 -gt 60 || 12 -gt 47 ]] Whereas, when I tried the associative array workings from the command line, it worked fine: - (0:c:/tmp) - - - - - - - - - - - - - - - typeset -A NAME - (0:c:/tmp) - - - - - - - - - - - - - - - NAME=(test1 1 test2 2 test3 3 test4 4) - (0:i:/tmp) - - - - - - - - - - - - - - - echo $NAME 1 2 3 4 - (0:i:/tmp) - - - - - - - - - - - - - - - echo $NAME[test1] 1 - (0:i:/tmp) - - - - - - - - - - - - - - - expr $NAME[test1] + 2 3 - (0:i:/tmp) - - - - - - - - - - - - - - - echo $(expr $NAME[test1] + 2) 3 - (0:i:/tmp) - - - - - - - - - - - - - - - echo "$(expr $NAME[test1] + 2)" 3 Any thoughts, please? Thanks Joe