Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
compadd -Q -U completes $(( without inserting upon it
- X-seq: zsh-workers 37651
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: compadd -Q -U completes $(( without inserting upon it
- Date: Sat, 16 Jan 2016 18:25:14 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=/4m1V8hLUI8+E3+Ius+BRm5ShQETD6CP8uoe64yv40k=; b=yj+9XDgxHr1SOpb2wV5G1mZWNF0OPD2sXn6s4AMDzIFu/TLNTLuLD5zjgyKfr7nnKC ja1EdjY7fp3zxSzFLBR8WQzE3383Yop7eY7Jdu50TdqB9UudH/D67A2jzL2peIByoffL +/R0mJ84R1TtPzCK0tbE1BJ0+mUVD7591QXeqmkjKZsc4HLlF4zk2/rj80SPg0FjgRH2 7D+UpEqaZBbHZn02eiA7nq6UDJde+rdqrLQketRAFQ8+eeGYlsyPIUaYnz6pOxGtIuY6 hn+xpzDr6pdBvwC+jTx/A8HMRz8zUCzMPGiSi9mnLrPVqQXOqNYDa/q7+uoAH/N64WCt dbHg==
- 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
Hello,
I have two completers, first one:
PREFIX='open'
SUFFIX=''
IPREFIX=""
ISUFFIX=""
words=( 'open' )
builtin compadd -Q -U 'open 0 + 1 close'
second one:
PREFIX='$(('
SUFFIX=''
IPREFIX=""
ISUFFIX=""
words=( '$((' )
builtin compadd -Q -U '$(( 0 + 1 ))'
With first one, if I do "open<TAB>", I get: "open 0 + 1 close". With
second one, when I do "$((<TAB>", I get "$(($(( 0 + 1 ))'.
This looks like zsh source has embedded tweaks to make math
($compstate[context] is "math" in second case) completing work more
reasonably. Is there a way to overcome this?
Video:
https://asciinema.org/a/9o1wwp76t0z2j2fz15aoucwym
To test the attached files:
autoload compadd_test ; zle -N compadd_test
autoload compadd_test2 ; zle -N compadd_test2
then:
zstyle ':completion:*' completer compadd_test _complete
or:
zstyle ':completion:*' completer compadd_test2 _complete
Best regards,
Sebastian Gniazdowski
Attachment:
compadd_test
Description: Binary data
Attachment:
compadd_test2
Description: Binary data
Messages sorted by:
Reverse Date,
Date,
Thread,
Author