Re: [PATCH] Allow == as synonym for = in test

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

 



Jonathan Nieder:
> Has the Austin Group made a decision
> on whether this syntax is going to be supported?

I don't think a decision has been formally made.  Most of the email discussion has been about possibly adding "<" and ">" to the spec, which are not in the current POSIX spec but are already implemented in dash.  The last comment posted on mantis about this extension to POSIX was positive; eblake (manager) said, "adding the other four operators (==, -ot, -nt, -ef) make[s] sense" [http://austingroupbugs.net/view.php?id=375].

> dash tends to support features that ash and older
> versions of dash supported (to avoid breaking backward compatibility)

Busybox's ash *already* supports "==", so I think that's *also* an argument for adding "==".  After all, adding "==" would improve compatibility between busybox ash and dash, and its effect on space and speed is miniscule.  I understand that dash wants to be "lean and mean", but busybox does too, and even busybox supports "==". 

I think it's reasonably likely that "==" will be added to the POSIX spec, but that's not up to me.  Even if this syntax isn't added to the official standard, I still think it'd make sense to support "==".  It's already implemented in a number of shells, including bash, busybox ash, and ksh.  More importantly, a lot of extant shell scripts use it; many scripts won't work on dash because dash doesn't include "==".

--- David A. Wheeler
--
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