Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: A way to write type-agnostic script/function runnables
- X-seq: zsh-users 24492
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: A way to write type-agnostic script/function runnables
- Date: Thu, 5 Dec 2019 12:15:09 +0100
- In-reply-to: <CAKc7PVCy_yUz6Yrxn6xprKohBP=o_zj-pRnJVY-tdsdx=gf3wg@mail.gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- List-unsubscribe: <mailto:zsh-users-unsubscribe@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVCy_yUz6Yrxn6xprKohBP=o_zj-pRnJVY-tdsdx=gf3wg@mail.gmail.com>
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