Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Compiled files ignore aliases
- X-seq: zsh-workers 37887
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Compiled files ignore aliases
- Date: Fri, 5 Feb 2016 16:33:02 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=aqS6bbCN8mRnOl+GUp1QZ5W5pD3SgB5VnLUkA/et+8I=; b=Sy/59jMIBMsmDucW8aFr9NLuUztwwOf6ROVxfTUPmlUGhLOwsqYWjTtbrkUJW5XG/N rqZl/RPntbZMvylNKcsxHrC9QAzC4V8g8gUo1aNPQgXqYagorLfIryoH9reB2Rii2eO/ jT618Kt9H2KAlurskJzJdRofQyn4JvLfTZH/QhFn61X7TJDKO2R1fCg4Jtgf0ARyDWFE wdxCMO2sQbHAxfdGsOEPqE6AhnZjSk3YDWVFIGssf1ixt1vcCueNUN5fYGcJ3Fp8NIte X65if59lteRMPyrDb95z1q86XXjxckxDCYJc6tuaVR4nCLnNOxkJp0mQg3nWs9UkcgII KK/g==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author