Re: multidefine chomps a non-delimiter character(s)

From: Muhammad Mahendra Subrata <mumahendras3_at_gmail.com>
Date: Thu, 13 Feb 2020 23:58:42 +0700

Got it. Thanks!

On Thu, Feb 13, 2020, 4:54 PM Laurent Bercot <ska_at_skarnet.org> wrote:

> Based on my understanding, it should output "foo bar1 bar2". But instead
> of that, the output is just "foo bar1 " (notice the space after bar1) so it
> seems that bar2 is being chomped, leaving $c with an empty word. Is this
> the intended behaviour?
>
>
> It is intended. From
> https://skarnet.org/software/execline/el_transform.html :
>
> < The last sequence of characters in the value will be recognized as a word
> < even if it is not terminated by a delimiter, unless you have requested
> < chomping and there was no delimiter at the end of the value before the
> < chomp operation - in which case that last sequence will not appear at
> all.
>
> Unless you know your value ends with a delimiter (so, a space or a tab),
> don't use the -n option to multidefine.
>
> --
> Laurent
>
>
Received on Thu Feb 13 2020 - 16:58:42 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:38:49 UTC