[patch] add ip addr del alias for delete [was: Re: ipaddr applet query]

Rob Landley rob at landley.net
Fri Mar 31 11:47:54 PST 2006


On Friday 31 March 2006 1:52 am, Bernhard Fischer wrote:
> On Thu, Mar 30, 2006 at 04:04:23PM -0600, Jason Schoon wrote:
> >It's a good point, I actually had a patch I was going to submit because
> > the example script for zcip uses del, rather than delete (as did I before
> > training myself to use delete).
> >
> >On 3/30/06, Adam Hawes <adamh at adpro.com.au> wrote:
> >> > Please let me know if the attached patch fixes the missing
> >> > "del" command
> >> > for you.
> >> >
> >> > It was made against the 1.1.1 version but should apply cleanly against
> >> > 1.01, too.
> >>
> >> Yes, it fixes the problem, thanks.  My email wasn't specifically a
> >> problem (I've learned to use 'delete').  I was more pointing it out
> >> because the documents and usage statement listed 'del' instead of
> >> 'delete'.
>
> I guess that alot of scripts do use delete or variations down to de.
>
> Maybe we should teach the compare_string_array() to match all these to
> be compatible with th big versions? Would make up a nice config option
> in the "Busybox Library Tuning" menu..

We need a library function that does some variant of:

int submatch(char *test, char *str)
{
  if (!*test) return 0;
  for(;;) {
    if (!*test) return 1;
    if (!*str) return 0;
    if (*(test++) != *(str++)) return 0;
  }
}

And then submatch(input,"walrus") should match "walrus", "walru", "walr", 
"wal", "wa", and "w".

Rob
-- 
Never bet against the cheap plastic solution.


More information about the busybox mailing list