fish-shell/tests/function.out
Kevin Ballard cfc06203e7 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`.
2014-10-02 18:41:39 -07:00

21 lines
221 B
Plaintext

Testing -V
$foo: (1)
1: 'local foo'
$bar: (5)
1: 'one'
2: 'two 2'
3: ' '
4: ''
5: '3'
$baz: (0)
Testing -V with changed variables
$foo: (1)
1: 'local foo'
$bar: (5)
1: 'one'
2: 'two 2'
3: ' '
4: ''
5: '3'
$baz: (0)