Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug#537596: regression: parse error near `()' in function definition
- X-seq: zsh-workers 27172
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Bug#537596: regression: parse error near `()' in function definition
- Date: Sun, 19 Jul 2009 21:18:20 -0700
- In-reply-to: <20090719232041.GA5156@xxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20090719171651.GA7217@xxxxxxxxxxxxxxxxxxxxxxxxxx> <20090719232041.GA5156@xxxxxxxx>
On Jul 19, 11:20pm, Clint Adams wrote:
}
} Does this have anything to do with users/14240?
It's possible, but I can't reproduce the error. Does he possibly also
have "ls" aliased to something so that there's more than one expansion
going on?
Note that in neither of his examples is he actually doing what he
wants to do. In the first case (if it "worked") he'd be creating
two functions named "ls" and "-lt", and in the second example he's
creating a function named "foo" (not one named "de").
} On Sun, Jul 19, 2009 at 07:16:51PM +0200, martin f krafft wrote:
} > A regression introduced by this build:
} >
} > This works (I use eval since those functions are defined in a loop[0])
} >
} > % eval 'de() { (_de-en $*; _en-de $*) | more }'
} > % which de
} > de () {
} > (
} > _de-en $*
} > _en-de $*
} > ) | more
} > }
} >
} > But:
} >
} > % eval 'lt() { (_lt-en $*; _en-lt $*) | more }'
} > zsh: parse error near `()'
} >
} > Alright, so lt is special:
} >
} > % which lt
} > lt: aliased to ls -lt
} >
} > But that does not prevent de from being defined:
} >
} > % alias de=foo
} > % eval 'de() { (_de-en $*; _en-de $*) | more }'
} > % which de
} > de: aliased to foo
} >
} > [0] http://git.madduck.net/v/etc/zsh.git?a=blob;f=.zsh/zshrc/30_aliases;h=f206c8c8bfeaf777a6f4ebef5ea4b54746376b7e;hb=HEAD#l131
}-- End of excerpt from Clint Adams
Messages sorted by:
Reverse Date,
Date,
Thread,
Author