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

Re: Announce of Zsh Navigation Tools



On 09/12/2015 04:43 PM, Bart Schaefer wrote:
On Sep 12,  4:03pm, Ray Andrews wrote:
}
} immediately makes me want do something like this:
}
}      for aa in /aWorking/Zsh/Source/*; do autoload $aa; done
}
} ... remembering of course that things need to be rewritten to look like
} scripts.

As long as there is only one function per file, you don't need to rewrite
them, just use

    ...; do autoload -k $aa; done

Shucks, I can do it in a for loop then? Thought that would be too easy. Nuts, that's down right friendly. zsh seems less sadistic all the time ;-)
} BTW, looking at $fpath, it sure is laborious. Do we, could we have some
} sort of automatic subdirectory inclusion?

I'm not sure what you mean by this, that is, are you trying to build up
the value of $fpath or are you trying to find all the files in $fpath
to autoload them?

I mean just ...


/usr/local/share/zsh/site-functions
/usr/share/zsh/vendor-functions
/usr/share/zsh/vendor-completions
/usr/share/zsh/functions/Calendar
/usr/share/zsh/functions/Chpwd
/usr/share/zsh/functions/Completion
/usr/share/zsh/functions/Completion/AIX
/usr/share/zsh/functions/Completion/BSD
/usr/share/zsh/functions/Completion/Base
/usr/share/zsh/functions/Completion/Cygwin
/usr/share/zsh/functions/Completion/Darwin
/usr/share/zsh/functions/Completion/Debian
/usr/share/zsh/functions/Completion/Linux
/usr/share/zsh/functions/Completion/Mandriva
/usr/share/zsh/functions/Completion/Redhat
/usr/share/zsh/functions/Completion/Solaris
/usr/share/zsh/functions/Completion/Unix
/usr/share/zsh/functions/Completion/X
/usr/share/zsh/functions/Completion/Zsh
/usr/share/zsh/functions/Completion/openSUSE
/usr/share/zsh/functions/Exceptions
/usr/share/zsh/functions/MIME
/usr/share/zsh/functions/Misc
/usr/share/zsh/functions/Newuser
/usr/share/zsh/functions/Prompts
/usr/share/zsh/functions/TCP
/usr/share/zsh/functions/VCS_Info
/usr/share/zsh/functions/VCS_Info/Backends
/usr/share/zsh/functions/Zftp
/usr/share/zsh/functions/Zle

... one might imagine some shorthand '/usr/share/zsh/functions/**/' meaning to include all those subdirs in $fpath automatically without needing to write each one out literally thus fpath would look like:

/usr/local/share/zsh/site-functions
/usr/share/zsh/vendor-functions
/usr/share/zsh/vendor-completions
/usr/share/zsh/functions/**/

... because all the subdirs of /usr/share/zsh/functions would thus be included automatically. I'm just trying to get some mileage out of the std. recursive '**' idea as used in globbing already:

    $ ls ./**/

... why not use it in variables too?

even:

/usr/local/share/zsh/site-functions
/usr/share/zsh/vendor*
/usr/share/zsh/functions/**/

... it's a bit easier on the eye.



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