Clint Adams wrote:
> I imagine that this is somehow related to
>
> alias foo='echo bar'; foo
Right, it's the same problem. Aliases are expanded early on, during
input, and so you can't use an alias within the same chunk of shell code
as where it's defined. This isn't going to change; you need t
I imagine that this is somehow related to
alias foo='echo bar'; foo
On Mon, May 12, 2008 at 03:55:09PM +0100, martin f krafft wrote:
> % cat <<_eof > foo
> alias foo='echo bar'
> fn() { foo }
> foo
> which foo
> _eof
> % . ./foo
> bar
> foo: aliased to echo bar
> % unalias foo; unfunction fn
> %
also sprach martin f krafft <[EMAIL PROTECTED]> [2008.05.12.1555 +0100]:
> alias foo='echo bar'
> fn() { foo }
If those two are split between files, it's the second one, the
function definition file, which must not be compiled for this to
work.
--
.''`. martin f. krafft <[EMAIL PROTECTED]>
:
Package: zsh
Version: 4.3.6-2
Severity: normal
% cat <<_eof > foo
alias foo='echo bar'
fn() { foo }
foo
which foo
_eof
% . ./foo
bar
foo: aliased to echo bar
% unalias foo; unfunction fn
% zcompile foo
% . ./foo
./foo:3: command not found: foo
foo: aliased to echo bar
OUCH!
-- System Informatio
4 matches
Mail list logo