Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Bug in function in function



Am Fr den 20. Mai 2022 um 18:16 schrieb Mikael Magnusson:
> On 5/20/22, Klaus Ethgen <Klaus@xxxxxxxxx> wrote:
> > Am Fr den 20. Mai 2022 um 16:37 schrieb Bart Schaefer:
> >> On Thu, May 19, 2022 at 12:34 PM Klaus Ethgen <Klaus@xxxxxxxxx> wrote:
> >> >
> >> > Now I get an error in the `ls()` line. It is even more strange that I
> >> > don't get an error when compiling it as zwc file!
> >>
> >> What's the error?
> >
> > /home/klaus/.zsh/zshrc/30_aliases:471: parse error near `()'
> >
> > This is the line `ls()`. the first function definition (`cd()`) does
> > work. And when compiling, both work as expected.
> >
> > I have an alias `alias ls="LC_COLLATE=POSIX ls $_ls_opts"` before this
> > line but that should not interfere the function definition.
> 
> In fact it should, and it does. Change your function definition(s) to
> the form "function ls".

Putting a `function` in front of `ls()` work.

However, I was thinking, `function` (in that context) is deprecated.

Regards
   Klaus
-- 
Klaus Ethgen                                       http://www.ethgen.ch/
pub  4096R/4E20AF1C 2011-05-16            Klaus Ethgen <Klaus@xxxxxxxxx>
Fingerprint: 85D4 CA42 952C 949B 1753  62B3 79D0 B06F 4E20 AF1C

Attachment: signature.asc
Description: PGP signature



Messages sorted by: Reverse Date, Date, Thread, Author