zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <okiddle@yahoo.co.uk>
To: zsh-workers@zsh.org
Subject: Re: [PATCH] compstate[to_end] and suffixes
Date: Sun, 20 Nov 2016 12:51:51 +0100	[thread overview]
Message-ID: <48406.1479642711@hydra.kiddle.eu> (raw)
In-Reply-To: <20161119062356.GA29987@fujitsu.shahaf.local2>

Daniel Shahaf wrote:
> What's a minimal example that triggers this code?  (So I can add a unit
> test)

How about the following?

Oliver

diff --git a/Test/Y01completion.ztst b/Test/Y01completion.ztst
index b3f8be4..7d8d70d 100644
--- a/Test/Y01completion.ztst
+++ b/Test/Y01completion.ztst
@@ -9,6 +9,7 @@
     cd comp.tmp
     comptestinit -z $ZTST_testdir/../Src/zsh &&
     {
+      comptesteval 'compdef _tst tst'
       mkdir dir1 &&
       mkdir dir2 &&
       touch file1 &&
@@ -87,6 +88,16 @@ F:regression test workers/31611
 0:directory name is not a glob qualifier
 >line: {cd ../C/}{}
 
+  comptesteval "_tst() { compadd -U -s : -S / -I . word; compstate[to_end]= }"
+  comptest $'tst .\C-b\t'
+0:allow for suffixes when moving cursor to end of match (with ignored suffix)
+>line: {tst word:/}{.}
+
+  comptesteval "_tst() { compadd -s : -S / word; compstate[to_end]= }"
+  comptest $'tst \t'
+0:allow for suffixes when moving cursor to end of match (without ignored suffix)
+>line: {tst word:/}{}
+
 %clean
 
   zmodload -ui zsh/zpty


      reply	other threads:[~2016-11-20 11:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-19  6:23 Daniel Shahaf
2016-11-20 11:51 ` Oliver Kiddle [this message]

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=48406.1479642711@hydra.kiddle.eu \
    --to=okiddle@yahoo.co.uk \
    --cc=zsh-workers@zsh.org \
    /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).