Re: rc.subr: disabling globbing while processing devfs rules

From: Jilles Tjoelker <jilles_at_stack.nl>
Date: Mon, 1 Apr 2013 21:56:01 +0200
On Mon, Apr 01, 2013 at 02:06:50PM -0400, John Baldwin wrote:
> Why not use 'local -' instead of the $- magic?  That is:

> devfs_rulesets_from_file()
> {
>    local file _err _me -
> 
>    ...
>    set -f
>    ...
> }

> That would seem to be simpler.

I had mentioned this possibility on IRC, but this feature is specific to
Almquist-derived shells (ash) and so something more portable was
selected. (It's still not standard because POSIX does not specify
"local" but it works on most shells in use.)

-- 
Jilles Tjoelker
Received on Mon Apr 01 2013 - 17:56:20 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:40:36 UTC