On Monday 18 March 2013 05:37:10 walter harms wrote: > Am 18.03.2013 10:09, schrieb Bastian Bittorf: > > * Joshua Judson Rosen <[email protected]> [18.03.2013 09:58]: > >> failure to dot/source a file can still result in an error-message > >> without making the shell quit. In order to do that, I had to slightly > >> adjust > > > > somebody posted a link to the posix-standard, where explicity is > > written, a shell must abort when a '. $file' fails. what is your > > usecase? why is a > > > > [ -e "$file" ] && . "$file" > > > > not ok for you? my usecase was more a "speed" issue, because > > it's somehow code duplication, but i'am ok with this if the standard > > enforces the check. > > GNU has something called POSIX_CORECTLY i would say to do the same here. > GNU has actualy a env-var we can use a compile time switch.
the POSIXLY_CORRECT env var that bash has is used to change its behavior when
it conflicts with the posix standard. it is not used to generally disable bash
features.
for example, in posix mode, this command:
. foo.sh
will search for foo.sh via $PATH, but will not fall back to $PWD. in non-
posix mode, bash will fall back to $PWD.
there are a bunch of other random examples, but they're all fairly esoteric.
i don't think we need to go that far considering we already have a BASH_COMPAT
define.
-mike
signature.asc
Description: This is a digitally signed message part.
_______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
