zsh-users
 help / color / mirror / code / Atom feed
* simulation of dabbrev-expand
@ 1999-09-09 12:39 Adam Spiers
       [not found] ` <990909171104.ZM15814@candle.brasslantern.com>
  0 siblings, 1 reply; 2+ messages in thread
From: Adam Spiers @ 1999-09-09 12:39 UTC (permalink / raw)
  To: zsh users mailing list

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 :-(


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: simulation of dabbrev-expand
       [not found] ` <990909171104.ZM15814@candle.brasslantern.com>
@ 1999-09-16 16:34   ` Adam Spiers
  0 siblings, 0 replies; 2+ messages in thread
From: Adam Spiers @ 1999-09-16 16:34 UTC (permalink / raw)
  To: zsh users mailing list

Bart Schaefer (schaefer@candle.brasslantern.com) wrote:
> On Sep 9,  1:39pm, Adam Spiers wrote:
> } Subject: simulation of dabbrev-expand
> }
> } 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.
> 
> Can you perhaps give a more specific example?  I'm not having any trouble
> with this at all.

  % history 1 | grep ' /' | wc -l
      650
  % zle -l | grep hist
  _history_complete_word -C .complete-word _history_complete_word
  _reverse_history_complete_word -C reverse-menu-complete _history_complete_word
  % _history_complete_word () {
  local expl
  compstate[list]=list
  compstate[insert]=menu
  _description -V expl 'history word'
  compgen -V 'history words' -Q -H 0 ''
  }
  % bindkey ^[/
  "^[/" _history_complete_word
  % less /<>
  % less /usr/share/zsh/functions/_man
  zsh: do you wish to see all 51 possibilities? 

Where did all the others go?  For example, a very old entry in my
history (I save large histories):

   114  cp /share/software/redhat/updates-6.0/i386/netscape-* .

but when I try do

  % ls /s<meta-/>

nothing happens.  The newer entries work fine.  This problem has
exhibited itself in exactly the same way across zsh-3.1.6-pws-* :-(

> What history-related options do you have set?

  % setopt | grep hist
  cshjunkiehistory
  extendedhistory
  histallowclobber
  histexpiredupsfirst
  histignorealldups
  histignoredups
  histignorespace
  histreduceblanks
  histverify
  incappendhistory

Adam


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-09-16 16:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-09 12:39 simulation of dabbrev-expand Adam Spiers
     [not found] ` <990909171104.ZM15814@candle.brasslantern.com>
1999-09-16 16:34   ` Adam Spiers

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).