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

Re: Problem with user function



On Fri, 23 Feb 2024 19:30:15 +0100
Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx> wrote:

> On Fri, Feb 23, 2024 at 6:49 PM Duke Normandin
> <dukeofpurl@xxxxxxx> wrote:
> >
> > After installing .oh-my-zsh, I get this error msg, which I
> > didn't while running plain zsh.
> >
> > .zshrc:92: defining function based on alias `ls'
> > .zshrc:92: parse error near `()'
> >
> > The errors refer to a few functions that I use to take notes:
> >
> > n() {$EDITOR ~/notes/${1}.txt}
> > l() {$PAGER ~/notes/${1}.txt}
> > nls() {ls --group-directories-first -c --color ~/notes/${1} }
>
> I don't see anything wrong with this code. The error you've got
> happens when you do this:
>
>     alias ls='ls -A'
>     ls() { whatever; }

No! It happens when I launch a terminal and my .zshrc file is read.

> Does your .zshrc attempt to define a function called "ls" on line
> 92? What does that line look like?

It looks like what I included in my original message. See above in
the quotes!
--
Duke




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