Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

smart-insert-last-word problem



Can someone email me a copy of the latest smart-insert-last-word?  My
version copied off the mailing list exhibit problem:

smart-insert-last-word:108: bad math expression: operator expected at
`Account fo...'

The segment looks like:

     94       # This is the "smart" part -- search right-to-left and
     95       # latest-to-earliest through the history for a word.
     96       integer n=0 found=$lastcmd[(I)$pattern]
     97       if zstyle -t :$WIDGET auto-previous
     98       then
     99           while (( found == 0 && ++n ))
    100           do
    101               zle .up-history || return 1
    102               buffer=$history[$HISTNO]
    103               lastcmd=( ${${(z)buffer}:#\;} )
    104               found=$lastcmd[(I)$pattern]
    105           done
    106       fi
    107       (( found-- > 0 &&            # Account for 1-based index
    108         (numeric = $#lastcmd - found) ))
    109   fi

Moving the '# Account for 1-based index' to a line above generates
different error:

    No such widget `auto-suffix-retain'

Are there new widget to download?  BTW, I am using 4.3.2
TIA.



Messages sorted by: Reverse Date, Date, Thread, Author