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

Re: Default fpath



On Mar 14, 11:19am, Sven Wischnowsky wrote:
} Subject: Re: Default fpath
}
} Bart Schaefer wrote:
} > Actually, what would suit me fine is a way to dump out a
} > .zwc of (a subset of the) functions defined in a running zsh.
} 
} That's easy. Would you prefer it as an option to `zcompile' or one for
} `functions'?

I think it should go in zcompile, just because of potential confusion
between "functions" and "typeset -f".  It's not *that* big a deal, I
guess, but somehow having anything that's described as "equivalent to
typeset" write to a file, bothers me.

[Tagging .zwc for zsh/ksh loading:]
} 
}   zcompile -z comp.zwc .../Completion/*/_*
} 
} to have them all loaded zsh-like.
} 
}   zcompile foo.zwc -z bar -k baz
} 
} would load bar zsh-like and baz ksh-like.
} 
} Ok?

Seems fine to me.  Hmm, maybe autoload should have the `k' and `z' opts,
too, but they only work with +X (the load-it now option).  That would
fix something that's been bugging me for a while.

} But maybe this is a case where adding functions to a wordcode file
} would be handy:
} 
}   zcompile foo.zwc -z bar1 baz1
}   zcompile -a foo.zwc -k bar2 baz2
} 
} would create a wordcode file with bar1/baz1 loaded zsh-like and then
} add bar2/baz2 loaded ksh-like to it.

That would be reasonable, too, but with the "autoload" patches as well,
I think the `zcompile -a ...' line would be equivalent to

    zsh -fc 'fpath=(...);\
	     autoload +Xw foo;\
	     autoload +Xk bar2 baz2;\
	     zcompile -c foo'

which could be provided as a utility function rather than a builtin.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



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