zsh-workers
 help / color / mirror / code / Atom feed
From: Adam Spiers <adam@thelonious.new.ox.ac.uk>
To: zsh-workers@sunsite.auc.dk
Subject: Re: simulation of dabbrev-expand
Date: Wed, 22 Sep 1999 23:13:17 +0100	[thread overview]
Message-ID: <19990922231317.A30531@thelonious.new.ox.ac.uk> (raw)
In-Reply-To: <199909221411.QAA20959@beta.informatik.hu-berlin.de>

Sven Wischnowsky (wischnow@informatik.hu-berlin.de) wrote:
> 
> Adam Spiers wrote:
> 
> > [ removing duplicates in completion lists ]
> > 
> > I think it should be optional.  I also think you should have the
> > choice of whether to remove all duplicates or just consecutive ones.
> > What about -1 and -2, or some other funny option characters?
> 
> Ok. This makes `-1' keep the completion system from removing all
> duplicates and `-2' keep it from removing consecutive duplicates. Yes, 
> the sense is reversed so that `-J' still gives the normal behaviour.

Nice work, Sven!  The potential for an almost perfect
_history_complete_word is now upon us ... although I'm having problems
creating it.

The current situation is that _history_complete_word crawls through
matching history words, oldest first.  This is counter-intuitive,
impractical, and not what tcsh users would expect; so I've been
trying to change it to the following setup:

   M-/  _reverse_history_complete_word
   M-,  _history_complete_word

_reverse_history_complete_word startest with the most recent match and
works back, and vice versa for _history_complete_word.

However, I got stuck when handling the history_stop feature.
When in verbose mode, history_stop uses _message to indicate that the
beginning/end of the history has been reached.  However, unless I've
got things really wrong, _message seems to destroy any old list of matches
which you might want to keep.  I can't understand why, as it's only
essentially a compadd -X ... -n ''.  I want to do something like:

    compstate[old_list]=keep
    _message 'beginning of history reached'

so that if you hit the oldest match and press M-/ again, it displays
this message but keeps the oldest match (should I need a
compstate[insert]=1 again, or is it enough to have done that the first
time the oldest match was displayed?), and if you switch to M-, it
will keep this old_list again and start moving in the opposite
direction.

Finally, should forward and reverse motion both be handled by the same
widget?

If you can help with the above problem then with luck I'll be able to
save you the hassle of rewriting all the code.  Thanks!

Adam


  parent reply	other threads:[~1999-09-22 22:13 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-09-22 14:11 Sven Wischnowsky
1999-09-22 14:57 ` Zefram
1999-09-22 22:13 ` Adam Spiers [this message]
  -- strict thread matches above, loose matches on Subject: below --
1999-09-21  7:28 Sven Wischnowsky
1999-09-21  7:20 Sven Wischnowsky
1999-09-22  0:03 ` Adam Spiers
1999-09-20  8:40 Sven Wischnowsky
1999-09-20 22:00 ` Adam Spiers
     [not found] <19990909133913.A30055@thelonious.new.ox.ac.uk>
     [not found] ` <990909171104.ZM15814@candle.brasslantern.com>
     [not found]   ` <19990916173409.A17932@thelonious.new.ox.ac.uk>
1999-09-17 21:44     ` Adam Spiers

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=19990922231317.A30531@thelonious.new.ox.ac.uk \
    --to=adam@thelonious.new.ox.ac.uk \
    --cc=adam@spiers.net \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).