Re: expand: Fix ghost fields with unquoted $@/$*

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 23/03/2018 10:10, Herbert Xu wrote:
On Fri, Mar 23, 2018 at 09:27:37AM +0100, Harald van Dijk wrote:

Also the above. But it breaks a traditional ash extension:

   unset IFS
   set -- A1 B2 C3
   echo ${@%2 C3}

This used to print A1 B, but prints A1 B2 C3 with your patch.

   echo ${@%2}

This used to print A1 B2 C3, but prints A1 B with your patch.

Hmm, it still does on my machine:

Apologies, I ended up sending the wrong test case. It's when IFS has its default value that the behaviour is changed. It's when it's unset that it still works.

Initial testing was against 0.5.9.1 plus your patch, now retested against c166b71 plus your patch.

Cheers,
Harald van Dijk
--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux