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

Re: zmodload zmv ?

Nick Croft wrote:

zmv looks to be a very handy utility. With Debian, it's located
under /usr/share/zsh/4.0.4/functions/Misc  .

I've tried starting it with zmodload zmv - nothing.

I've moved, chowned, and chmodded it to a local fpath.

What's the trick? All the googling points to the same paragraph being
quoted. The source contains a pretty good description of its uses but no
hint as to startup.

It tries to do something if I explicitly quote the path in the command
line. But emulating the example produced the following

       nicko@work ~/tmp % ../.myfns/zmv '(*).bmp '$1.BMP'
       ../.myfns/zmv: emulate: command not found
       ../.myfns/zmv: local can only be used in a function
       ../.myfns/zmv: typeset: unknown option: `-A'
       ../.myfns/zmv: integer: command not found
       ../.myfns/zmv: setopt: command not found

I imagine those calls would work without problems if it could be loaded with zmodload.


I could recommend this line in your startup:
for func in $^fpath.zwc(N-.r:); autoload -U -w $func

then all functions are loaded at startup at little cost.

use Inline C => qq{void p(char*g){printf("Just Another %s Hacker\n",g);}};p("Perl");

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