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

Re: A way to write type-agnostic script/function runnables



On Mon, 25 Nov 2019 at 15:22, Sebastian Gniazdowski
<sgniazdowski@xxxxxxxxx> wrote:
> I wonder if one could get the directory where the function is being
> located directly, without the global *_DIR parameter? Without use of
> the $*trace parameters (I don't trust them;).

I've had a thought: it shouldn't be an uncomfortable thing to use
shell's features → if the object is being run as a function, then it
has access to the in-session parameters – and why hesitate to leverage
this? So in short, the PLUGIN_NAME_DIR parameter is a good solution,
there's no need for querying the autoload's storage directory.

-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org



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