Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] compstate[to_end] and suffixes
- X-seq: zsh-workers 39993
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] compstate[to_end] and suffixes
- Date: Sun, 20 Nov 2016 12:51:51 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1479642712; bh=L1eMP7w3CczPKb+rXbl8i2j/e9kGDwzaNGGHnMuzDVs=; h=In-reply-to:From:References:To:Subject:Date:From:Subject; b=PaN+1IwVPjfODqKSy44pfTKdXs9k6ovtnxqxH4+xjHlkeJPp+syOmT8Z4rkfymeQ/wrXSj5D5XKREP9r3wNT3kWAkU01Sif2kgcvuuUnoohmslL2+zr1iwpj3wrZYtubv/sNEnPQLsaJV0hj2P4JRSJHyEMD2r0oq5JfuF38zYMO/K4Z4R+tg6f1fOpoeGjRMbVe/6YclPvmtG+quLGDBfXqRVh6qmKMCHQ/RW0eO1he2zTBgkwBP+4gLPlTILe9i1K7TzVFA5ZwyV8HmUuTataJFqSq7hUJoQrkwxbgDkT91t3XOsTZ4HJAq3kBJ0nfvW8HHtx4LU9nROEfgxxlvA==
- In-reply-to: <20161119062356.GA29987@fujitsu.shahaf.local2>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author