From: Daniel Shahaf <d.s@daniel.shahaf.name>
To: Sebastian Gniazdowski <sgniazdowski@gmail.com>
Cc: Zsh hackers list <zsh-workers@zsh.org>
Subject: Re: _history-complete-older problems with $(
Date: Fri, 15 Jan 2016 06:26:46 +0000 [thread overview]
Message-ID: <20160115062646.GB13897@tarsus.local2> (raw)
In-Reply-To: <CAKc7PVAdLiKGvay412eLo=0jCpRB9PktAkAVj08sE=gjZ=4nQw@mail.gmail.com>
Sebastian Gniazdowski wrote on Thu, Jan 14, 2016 at 10:52:14 +0100:
> PS. I used the "find LBUFFER myself" approach to handle following case
> better ("|" is cursor):
>
> % $(( 0 |+ 1 ))
>
> Doing ${(z)LBUFFER} and then (z) on right part of BUFFER would produce
> SUFFIX="+" instead of "+ 1 ))". If I find the word in ${(z)BUFFER}
> and divide it into two halves myself, then I have PREFIX="$(( 0 "
> SUFFIX "+ 1 ))". However, following case works better with LBUFFER
> approach:
>
> % ${|a some other $words
>
> With LBUFFER approach, PREFIX="${" SUFFIX="a" and that's better than
> PREFIX="${" SUFFIX="a some other $words". I can of course respect
> no_complete_in_words and do PREFIX="${a" SUFFIX="".
>
> I'm currently looking for a way to choose better strategy, maybe
> someone has some ideas?
You could have the widget try both strategies.
next prev parent reply other threads:[~2016-01-15 6:26 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-10 19:35 Sebastian Gniazdowski
2016-01-11 16:21 ` Sebastian Gniazdowski
2016-01-12 0:15 ` Bart Schaefer
2016-01-12 13:09 ` Sebastian Gniazdowski
2016-01-12 19:39 ` Bart Schaefer
2016-01-13 1:01 ` Daniel Shahaf
2016-01-13 2:01 ` Bart Schaefer
2016-01-13 16:40 ` Sebastian Gniazdowski
2016-01-14 4:48 ` Bart Schaefer
2016-01-14 11:30 ` Sebastian Gniazdowski
2016-01-14 11:37 ` Sebastian Gniazdowski
2016-01-14 11:59 ` Sebastian Gniazdowski
2016-01-15 3:18 ` Bart Schaefer
2016-01-15 5:07 ` Sebastian Gniazdowski
2016-01-15 6:26 ` Daniel Shahaf
2016-01-14 18:55 ` Sebastian Gniazdowski
2016-01-14 9:52 ` Sebastian Gniazdowski
2016-01-14 10:14 ` Sebastian Gniazdowski
2016-01-14 10:55 ` Sebastian Gniazdowski
2016-01-15 3:05 ` Bart Schaefer
2016-01-15 6:26 ` Daniel Shahaf [this message]
2016-01-13 1:01 ` Daniel Shahaf
2016-01-13 1:59 ` Bart Schaefer
2016-01-12 7:57 ` Bart Schaefer
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=20160115062646.GB13897@tarsus.local2 \
--to=d.s@daniel.shahaf.name \
--cc=sgniazdowski@gmail.com \
--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).