zsh-workers
 help / color / mirror / code / Atom feed
* Compiled files ignore aliases
@ 2016-02-05 15:33 Sebastian Gniazdowski
  2016-02-05 16:37 ` Bart Schaefer
  0 siblings, 1 reply; 4+ messages in thread
From: Sebastian Gniazdowski @ 2016-02-05 15:33 UTC (permalink / raw)
  To: Zsh hackers list

Hello,
this is probably expected as aliases are applied on parsing time. But
maybe this wasn't yet recognized?

% cat 2test-script.zsh
#!/bin/zsh
alias autoload="echo Hello; autoload"
#autoload() { echo "Hello"; builtin autoload "$@" }
source "./test-script.zsh"
echo "|"${functions[abc]}"|"


% cat test-script.zsh
#!/bin/zsh
echo "Hello from script, will call a builtin"
autoload abc


Output when using alias in 2test-script.zsh and test-script.zsh is
compiled (there is .zwc file):
% ./2test-script.zsh
Hello from script, will call a builtin
|builtin autoload -X|

Output when using function in 2test-script.zsh:
% ./2test-script.zsh
Hello from script, will call a builtin
Hello
|builtin autoload -X|


Any way to have aliases working when sourcing .zwc file?

Best regards,
Sebastian Gniazdowski


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-02-05 18:43 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-05 15:33 Compiled files ignore aliases Sebastian Gniazdowski
2016-02-05 16:37 ` Bart Schaefer
2016-02-05 17:24   ` Sebastian Gniazdowski
2016-02-05 18:43     ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).