From: Mikael Magnusson <email@example.com>
To: Julian Prein <firstname.lastname@example.org>
Cc: "email@example.com" <firstname.lastname@example.org>
Subject: Re: (z) word splitting on one word
Date: Thu, 22 Sep 2022 17:16:48 +0200 [thread overview]
Message-ID: <CAHYJk3QB4mMDWjH_YZVp5BB5C2D-vqmqKVEVe3cCjcvY-YeSCA@mail.gmail.com> (raw)
On 9/22/22, Julian Prein <email@example.com> wrote:
> I am trying to get the last word of LBUFFER.
> What I did previously was:
> This worked flawlessly until I noticed today that it misbehaves if LBUFFER
> contains only one word. In this case it seems like `[-1]` acts on a scalar,
> it expands to the last character instead of LBUFFER as I would expect.
> Is this expected behaviour?
> I now work around it by prepending LBUFFER with a dummy word so that it
> has at least two words (I know that it is not empty). But this feels very
> Do you know of a better way?
next prev parent reply other threads:[~2022-09-22 15:17 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-22 13:44 Julian Prein
2022-09-22 15:16 ` Mikael Magnusson [this message]
2022-09-24 0:38 ` Julian Prein
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:
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
* 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
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).