2014-09-27 23:53:12 +0200, Arfrever Frehtes Taifersar Arahesis:
[...]
> Ability to export/import functions with "=" in function names
> could be achieved by not embedding function names in
> environmental variables and using a single BASH_FUNCTIONS
> environmental variable whose value would contain code of all
> exported functions (in format similar to `declare -fpx` /
> `export -fp`).
[...]

That's what I had in mind as well.

bash could align its function definition syntax with zsh's and
do

BASH_FUNCTIONS="f(){ echo f;}
'some function'(){ echo sf; }
'even with
newline and / and '\''quote
...'() { echo x; }"

That would also be nicer with the environment as well
("BASH_FUNC_xxx()=" needs 14 bytes, plus the pointer (4/8 bytes)
per exported function.

If bash were to implement that, sudo and possible others would
have to be updated at the same time to blacklist that variable
(at the moment sudo blacklists variables whose value starts with
() which is why the change to BASH_FUNC_xxx()=()... didn't
expose sudo).

-- 
Stephane

Reply via email to