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

simulation of dabbrev-expand



I still haven't successfully got 3.1.6-pws-* simulating
dabbrev-expand.  I'm using:

_history_complete_word () {
  local expl

  compstate[list]=
  compstate[insert]=menu

  _description -V expl 'history word'
#  compgen "$expl[@]" -Q -H 0 ''
  compgen -V 'history words' -Q -H 0 ''
}

zle -C _reverse_history_complete_word reverse-menu-complete _history_complete_word
bindkey '^[,' _reverse_history_complete_word

(I previously tried bindkey '^[,' reverse-menu-complete, but the
problem isn't with the reversing; see below)

It appears to always work fine when grabbing words from history added
by the current shell, but either doesn't work at all, or very
unreliably when you want to grab a word from the saved history.  This
is driving me up the wall, because dabbrev-expand is one of the
features I use most!  I'd be very grateful if someone can show what
I'm doing wrong.

Adam

P.S. Sorry for the pathetically lame preexec post.  I've read the
manual over so many times, I was /sure/ that I would have noticed a
preexec feature if it had existed.  Serves me right for not checking :-(



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