diff options
author | Peter Stephenson <p.stephenson@samsung.com> | 2022-06-07 10:02:14 +0100 |
---|---|---|
committer | Peter Stephenson <p.stephenson@samsung.com> | 2022-06-07 10:02:14 +0100 |
commit | b26b6b3fe00b94a2d4370b1afd2644034947b6b8 (patch) | |
tree | d29604d25defe18200cfe049d0042efd7643a865 /Test | |
parent | a99f96797f5fc424554a94313dfc0d4a5b0923a1 (diff) | |
download | zsh-b26b6b3fe00b94a2d4370b1afd2644034947b6b8.tar.gz zsh-b26b6b3fe00b94a2d4370b1afd2644034947b6b8.tar.xz zsh-b26b6b3fe00b94a2d4370b1afd2644034947b6b8.zip |
Tweaks to MULTI_FUNC_DEF
Output multiple function definitions using "function" form. Note exceptions to errors with NO_MULTI_FUNC_DEF
Diffstat (limited to 'Test')
-rw-r--r-- | Test/C04funcdef.ztst | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Test/C04funcdef.ztst b/Test/C04funcdef.ztst index af469c527..b8509b25c 100644 --- a/Test/C04funcdef.ztst +++ b/Test/C04funcdef.ztst @@ -53,6 +53,26 @@ >b: redirection >a: redirection + define_multiple() { + fn1 fn2 fn3() { + print This is $0 + } + } + which -x2 define_multiple + define_multiple + fn1 + fn2 + fn3 +0: Safe output of multiple function definitions +>define_multiple () { +> function fn1 fn2 fn3 { +> print This is $0 +> } +>} +>This is fn1 +>This is fn2 +>This is fn3 + functions -M m1 m1() { (( $# )) } print $(( m1() )) |