From: Sven Wischnowsky <wischnow@informatik.hu-berlin.de>
To: zsh-workers@sunsite.auc.dk
Subject: Re: Bug w/matching control + feature request
Date: Tue, 9 Jan 2001 09:02:29 +0100 (MET) [thread overview]
Message-ID: <200101090802.JAA10875@beta.informatik.hu-berlin.de> (raw)
In-Reply-To: Felix Rosencrantz's message of Sat, 30 Dec 2000 14:58:58 -0800 (PST)
Felix Rosencrantz wrote:
> I'm seeing a problem with matching control and cursor placement. I suspect
> the problem might be related to too many match points...
>
> Here's the case:
>
> zsh@ zsh -f
> host% echo $ZSH_VERSION
> 3.1.9-dev-8
> host% autoload -U compinit ; compinit -D ; compdef _tst tst
> host% _tst () {
> function> compadd -M 'r:|[.,_-]=** r:[^0-9]||[0-9]=**' glibc-2.1.94-3.i386.rpm
> glibc-devel-2.1.94-3.i386.rpm glibc-profile-2.1.94-3.i386.rpm
> function> }
> host% tst glibc-2.1<TAB>
> results in:
> host% tst glibc-2[.]1.94-3.i386.rpm
>
> With the cursor sitting on the dot after the 2, rather than before the 2,
> which seems like the place it would end up.
Just to let everyone know: I'm working on this. The fix for the cursor
positioning isn't all that difficult, but I know about two other test
cases with wrong behaviour and want to send a patch for all things
together. And since I'm still extremely busy...
> Hmm... Since the matching specs and cursor positioning came up again,
> it got me thinking about a feature request I've wanted. There are times
> when matching places the cursor at the undesired spot for finishing the
> completion of the word I'm completing. The matching code has an idea of
> where several other reasonable cursor positions are (see the code
> at zsh/Src/Zle/compresult.c:415, which picks from several possible
> cursor locations as hot spots, there are probably a few more.)
>
> It seems like there would need to be a global array that is accessible to the
> completion functions, that would hold valid hot spots in the current word.
> It would then be possible to write a widget that would cycle the cursor
> between these spots.
I admit that I never thought of that. Sounds very sensible, and not
even too hard to implement. But I don't want to promise anything at
the moment...
Bye
Sven
--
Sven Wischnowsky wischnow@informatik.hu-berlin.de
next reply other threads:[~2001-01-09 8:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-09 8:02 Sven Wischnowsky [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-01-15 5:04 Felix Rosencrantz
2001-01-12 4:47 Felix Rosencrantz
2001-01-11 9:56 Sven Wischnowsky
2000-12-30 22:58 Felix Rosencrantz
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=200101090802.JAA10875@beta.informatik.hu-berlin.de \
--to=wischnow@informatik.hu-berlin.de \
--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).