Add new functions flag -V/--inherit-variable

--inherit-variable takes a variable name and snapshots its current
value. When the function is executed, it will have a local variable with
this value already defined. Printing the function source will include
synthesized `set -l` lines for the values.

This is primarily useful for functions that are created on the fly, such
as in `psub`.
This commit is contained in:
Kevin Ballard
2014-10-02 15:59:24 -07:00
parent 6d7a7b00d7
commit cfc06203e7
10 changed files with 152 additions and 7 deletions

0
tests/function.err Normal file
View File