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

Re: Problem with user function



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; }

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

Roman.




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