[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: The 'cut' operation should have synonyms
From: |
Erik Auerswald |
Subject: |
Re: The 'cut' operation should have synonyms |
Date: |
Fri, 3 Jun 2022 08:23:48 +0200 |
Hi Tim,
On Thu, Jun 02, 2022 at 10:31:06PM +0000, Tim Rice wrote:
>
> I've attached a patch which aims to implement 'echo' and 'uniq' as
> aliases to 'cut' and 'unique' respectively. Anyone who is interested
> should be able to try it out with `git apply /path/to/patch'.
>
> I'm not quite sure whether to merge it. If you look in the tests,
> you'll see that when datamash tries to do a "reverse lookup" of what
> command was used, it can't see the alias. It instead sees the original
> command. (Basically because of what comes first in a particular array,
> iiuc.)
>
> Perhaps that's reasonable behavior for what is clearly flagged as just
> an alias.
I think that is fine. It makes it clear that is just an alias.
> Furthermore, to try to fix it would require some refactoring of the
> field_operation structures, I think. If this is necessary, it should
> wait until after v1.8 has been released.
>
> Feedback welcome. I'll merge it tomorrow (i.e. Saturday morning
> Australia time) if no significant objections arise.
I've looked at the patch, but did not test it. Looks OK to me. :-)
Thanks,
Erik