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

Re: problem with zmv



On Sat, Dec 3, 2016 at 4:51 AM, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Dec 2,  6:59pm, Ray Andrews wrote:
> }
> } > On Dec 2,  4:15pm, Ray Andrews wrote:
> } >
> } > alias zmv='() { . zmv }'
> } >
> } Kewl.
>
> It occurs to me that it might be slightly better to use
>
>     alias zmv='function { . zmv }'
>
> In the unlikely event that the "zmv" alias gets expanded as the second
> word on the line, you'll get an error instead of defining the first
> word on the line as a function that calls zmv.

I feel it's worth pointing out to any other readers that the actual
correct way to do this is to just have
    autoload zmv
in your .zshrc and you're set for life.

-- 
Mikael Magnusson



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