[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issues with exported functions
From: |
Gabriel Corona |
Subject: |
Re: Issues with exported functions |
Date: |
Thu, 25 Sep 2014 21:57:59 +0200 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
> I'd much rather prefer the use of an invalid shell name (such as
> f()=...) than a valid shell name (BASH_FUNCTION_foo=()...).
Using a BASH_ prefix has some advantages:
* Anyone setting such a variable, might expect it could change the
behaviour of bash. Any script allowing setting untrusted BASH_
variables to untrusted values should probably expect bad things to
happen.
* Anyone seeing such a variable (in env) might expect it to change
the behaviour of bash. If I see foo(), in env I would probably not
think "Of course, it will change bash behaviour."
* It avoids name clashes: whateversh might want to use foo() for its
own (different) purpose.
Maybe both could be used, BASH_FUNCTION_foo()?
Is there any portability issue with using '()' on some OSes?
--
Gabriel
- Re: Issues with exported functions, (continued)
- Re: Issues with exported functions, Steve Simmons, 2014/09/24
- Re: Issues with exported functions, Gabriel Corona, 2014/09/25
- Re: Issues with exported functions, Gabriel Corona, 2014/09/25
- Re: Issues with exported functions, Chet Ramey, 2014/09/25
- Re: Issues with exported functions, Dan Douglas, 2014/09/25
- Re: Issues with exported functions, Chet Ramey, 2014/09/25
- Re: Issues with exported functions, Dan Douglas, 2014/09/25
- Re: Issues with exported functions, Eric Blake, 2014/09/25
- Re: Issues with exported functions,
Gabriel Corona <=
- Re: Issues with exported functions, Gabriel Corona, 2014/09/25
- Re: Issues with exported functions, Ángel González, 2014/09/25
- Re: Issues with exported functions, lolilolicon, 2014/09/25
- Re: Issues with exported functions, Steve Simmons, 2014/09/25
- Re: Issues with exported functions, Chet Ramey, 2014/09/25
- Re: Issues with exported functions, Eduardo A . Bustamante López, 2014/09/25
- Re: Issues with exported functions, Ángel González, 2014/09/25
Re: Issues with exported functions, lolilolicon, 2014/09/24