Logo
Explore Help
Sign In
h/fish-shell
1
Fork 0
You've already forked fish-shell
mirror of https://github.com/fish-shell/fish-shell.git synced 2026-04-21 17:21:14 -03:00
Code Issues Packages Projects Releases Wiki Activity
Files
443fc660484ec6768226144aaf1dc6f2744687de
fish-shell/tests/function.out

25 lines
305 B
Plaintext
Raw Normal View History

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 15:59:24 -07:00
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)
Correctly handle mixing named arguments with function name Before this fix, `function -a arg1 name1` would produce a function named 'arg1'. After this fix, it will produce a function named 'name'. See #2068 for more.
2015-05-17 14:17:01 -07:00
Function name1 found
Function name2 found
Function name3 found
Function name4 found
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.25.3 Page: 60ms Template: 3ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API