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

Re: Parse error on autoload -X and a function with & in name



Sadly the same applies to a [] prefix, which would be good one for
handlers, at it symbolizes an empty space to be filled (by the
handler):

function \[\]abcd() {
    autoload -X
}
noglob []abcd
(eval):1: no matches found: []abcd

On Mon, 8 Jul 2019 at 21:35, Sebastian Gniazdowski
<sgniazdowski@xxxxxxxxx> wrote:
>
> Hello,
>
> function \&abcd() {
>     autoload -X
> }
> \&abcd
>
> gives:
> (eval):1: parse error near `&'
>
> I wanted to use the symbol as a namespacer for internal functions.
> --
> Sebastian Gniazdowski
> News: https://twitter.com/ZdharmaI
> IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
> Blog: http://zdharma.org



-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org



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