Peter Stephenson
b26b6b3fe0
Tweaks to MULTI_FUNC_DEF
...
Output multiple function definitions using "function" form.
Note exceptions to errors with NO_MULTI_FUNC_DEF
2022-06-07 10:02:14 +01:00
Daniel Shahaf
ca94d3acda
unposted: Fix typos
2021-09-26 09:00:32 +00:00
Bart Schaefer
34a8fecf7b
48810: fix potential name clash in test case for autoloading
2021-05-15 13:45:14 -07:00
Peter Stephenson
4fae525726
Copy functions using functions -c old new.
...
Documentation and test.
2019-08-03 19:53:51 +01:00
Oliver Kiddle
65b265f3c0
42624 (plus test): avoid freeing memory that's still needed
...
This was occurring in a multiple function definition where a
function name is duplicated.
2018-04-12 23:15:29 +02:00
Peter Stephenson
aab0f6d763
42123 (tweaked): take account of Dash in function names.
...
Needed when comparing word code function name with autoload request.
Add test.
2017-12-15 09:00:37 +00:00
Peter Stephenson
174e560a23
41787 (plus minor tweaks): use $FUNCSTACK for function nesting depth.
...
Initialised from existing configuration value.
2017-10-02 09:44:26 +01:00
Peter Stephenson
47c05f6b66
40622 with typos fixed: functions -Ms.
...
This adds the capability for mathematical functions based on shell
functions to have a string argument. Module functions have had
this for a long time.
2017-03-01 10:01:01 +00:00
Peter Stephenson
ed855baf48
40465: update methods to output $PWD in tests.
...
Use method from B01cd.tst which resolves symbolic links and
matches against parameter in output.
2017-01-30 10:31:11 +00:00
Peter Stephenson
34f70c5dc0
40440: Add $functions_source hash to zsh/parameter.
...
This allows you to find out where a function was loaded from.
2017-01-28 19:33:27 +00:00
Peter Stephenson
d219f00609
43080: a few more tests for autoload with absolute path
2017-01-18 09:59:42 +00:00
Peter Stephenson
178e62dbfe
40342: Add directory name cache for autoload file paths.
...
This renders "autoload /blah/blah/*" as efficient as use of
fpath.
2017-01-12 20:56:20 +00:00
Peter Stephenson
33799ae2b0
40335: More care with autoload function path.
...
If doing "autoload -X", the path present might actually be location
of file containing the function with the autoload -X. Add
an explicit flag to say it's a directory for autoload.
2017-01-12 13:54:29 +00:00
Peter Stephenson
f26d1ba6b0
Add features associated with autoloading a function using an absolute
...
path.
-d defaults to normal fpath
-r remembers the path without actually loading. May be combined with -d.
-R does the same but it's an error if not found
-X can now take a directory path: this is used to output not yet loaded
functions that have an associated path.
2017-01-11 11:26:13 +00:00
Peter Stephenson
dc517212ca
39566: Improve usefulness of command_not_found_handler.
...
Don't behave as if command not found if return status is non-zero
as this may simply be the return status of the replacement command.
Let the function report a command not found instead.
2016-10-05 12:14:43 +01:00
Daniel Shahaf
f026a4dc12
38991: Make 'whence -v autoloaded-function' shows the defining filename.
...
This may also fix a problem whereby the %x prompt escape evaluated to
a function name rather than a filename, since %x is also backed by
scriptfilename.
2016-08-05 12:37:26 +00:00
Peter Stephenson
7c59c953f2
37765: Use FS_FUNC on fucstack to find autoload -X target.
...
This is better than scriptname which can be updated due to e.g.
intervening "eval".
2016-01-25 16:23:16 +00:00
Peter Stephenson
e5d5a76dce
Test for 36265, no alias expansion after "function"
2015-08-21 17:12:46 +01:00
Peter Stephenson
aaa19267c2
test for alias expansion in command substitution
2015-01-10 20:36:57 +00:00
Peter Stephenson
31750795fe
33345: fix anonymous function complex command handling.
...
Longstanding problem caused simple anonymous function incorrectly to
reset the overall "complext" state, causing wordcode to be diverted
into execsimple(), which caused a crash 'cos ist wasn't simple.
2014-10-03 16:29:56 +01:00
Peter Stephenson
7666ceb2bc
33343: Variant anonymous function synax with arguments.
...
Don't expand arguments as if in command position. Test.
2014-10-03 14:17:33 +01:00
Andrew Waldron
8189e12312
32552 (updated by 32560): fix segfault when using process substitution in anonymous function argument list
...
Also disallow process substitution in function name position.
2014-04-18 07:30:36 -07:00
Peter Stephenson
321471891e
30718: emulate command evaluations should apply sticky emulation
...
to autoloads, too
2012-10-07 17:50:18 +00:00
Peter Stephenson
d48faef8cd
29633: more care with anonymous and other functions
2011-08-03 18:45:17 +00:00
Peter Stephenson
7d1480af54
29626: arguments to anonymous functions shouldn't be parsed as command words
2011-07-28 09:20:02 +00:00
Peter Stephenson
6062529d3f
29492: add argument handling to anonymous functions
2011-06-19 20:12:00 +00:00
Peter Stephenson
bdfebe3e32
27129: fix status at start of function, command subst, etc.
2009-07-11 16:42:53 +00:00
Peter Stephenson
4db28c55b6
27126: a few more contexts where executing empty lists gives status zero
2009-07-10 22:10:25 +00:00
Geoff Wing
78d1f82e30
clean up test temporary files
2008-12-29 04:24:36 +00:00
Peter Stephenson
950756d579
25255: add anonymous function capability
2008-06-30 10:37:11 +00:00
Peter Stephenson
71f659dc00
23680: tests for 23671
2007-07-13 22:28:00 +00:00
Peter Stephenson
b7474e065b
22416, tweaked: math functions via shell functions
...
unposted: add styles to pick-web-browser
2006-04-19 16:09:06 +00:00
Sven Wischnowsky
a370470bae
moved from ./Test/09funcdef.ztst
2001-04-02 12:32:58 +00:00