Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: transpose-words-match (Re: New widget "transpose-segments")
- X-seq: zsh-workers 37526
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: transpose-words-match (Re: New widget "transpose-segments")
- Date: Sat, 9 Jan 2016 19:03:41 +0100
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=gIbmOvg2uojGVPVRGxa//U9M4oFUbUtNhfjjxnUe1vg=; b=s0aFpnWSl6AfQng0ZCPy6BcR8q+pSFkENiKpUQfOcaSP8Y3dYQBnGPX2HiyZTOVbF8 rZzUf5HyPkwtYy9BF1CWpbIjD9kwoWFPDoa42Xzz33LvbIElZDOf3yZK5XyIRowv/3VY sLOhsBQ4LZbRUKcRBQIbgEYg5y4MYDPlb3UDviGrJMQb52hRY7bYwtw0PxeuKjvRoSuR Pc6+QiYFSpEpc78ckmP/KMXTYuI8Hucv9dqN1UTW2o60lUu2HWl0dEIXXgU/OxKna6cX P6Pmwdwz0qza4yqW06+eh2+GdiMY85ulRJNTLrWeCh26FkjDUAUVRVB22zzq3CyN7JbF cYPg==
- In-reply-to: <160109094833.ZM3453@torch.brasslantern.com>
- 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: <CAKc7PVCVFN2639GkbitXO_yZtqK02zUWH-oLGYBysv6J3TreTg@mail.gmail.com> <160109092258.ZM3394@torch.brasslantern.com> <160109094833.ZM3453@torch.brasslantern.com>
On 9 January 2016 at 18:48, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Jan 9, 9:22am, I asked:
> }
> } How does this differ from
> }
> } zle -N transpose-words transpose-words-match
>
> One difference is that transpose-words-match uses a little more context,
> so
>
> % echo two words<alt-t>
>
> does not transpose because the cursor is not between two words, and
>
> % echo "two <alt-t>words"
> % echo words" "very
>
> swaps around the space even though it is in the middle of a "shell word".
That's a nice catch, finally a de facto difference between
transpose-words-match and transpose-segments. I tried lines like:
$(( i+1 )) a="${(u)a}" 試句相當長
and they worked the same. Now it can be seen that what you described
can also occur inside $(( )).
Best regards,
Sebastian Gniazdowski
Messages sorted by:
Reverse Date,
Date,
Thread,
Author