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

(No) Exported Functions


I've read the manuals and googled and as far as I can see, zsh doesn't appear to support exported functions. Is this true? If not please ignore the rest of the mail :)

Also, going through some old discussions, it appears that some people feel that the feature itself is of dubious value. However, I find it a shortcoming in the following situations:

1. In my environment are weird and wonderful functions that do some useful stuff on a list of files, let's say coolfun()

I can't do a 
$ find . -name '*.blah' | xargs coolfun # coolfun: No such file or directory

2. I can't invoke 
:!coolfun % 
from vim, my favourite editor.

Both shortcomings are somewhat rectified by arranging to have coolfun's definition in $HOME/.zshenv. However, this gets tedious (and possibly inefficient) when a large number of functions are involved. I tried doing a
$ functions >> ~/.zshenv
in my .zshrc as a shortcut but this puts all the autoloaded functions into the env file causing error messages when completion is first attempted etc. like:
$ cd sss<tab>
_next_label:comptags:8: no tags registered

Does anyone have a better solution / workaround to this problem. Or is exported functions somewhere in the feature-list ?


Visit our website at http://www.ubs.com

This message contains confidential information and is intended only
for the individual named.  If you are not the named addressee you
should not disseminate, distribute or copy this e-mail.  Please
notify the sender immediately by e-mail if you have received this
e-mail by mistake and delete this e-mail from your system.

E-mail transmission cannot be guaranteed to be secure or error-free
as information could be intercepted, corrupted, lost, destroyed,
arrive late or incomplete, or contain viruses.  The sender therefore
does not accept liability for any errors or omissions in the contents
of this message which arise as a result of e-mail transmission.  If
verification is required please request a hard-copy version.  This
message is provided for informational purposes and should not be
construed as a solicitation or offer to buy or sell any securities or
related financial instruments.

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