zsh-users
 help / color / mirror / code / Atom feed
From: Sebastian Gniazdowski <sgniazdowski@gmail.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: Re: A way to write type-agnostic script/function runnables
Date: Thu, 5 Dec 2019 12:15:09 +0100	[thread overview]
Message-ID: <CAKc7PVAa7FW9fhiRW0vn_HMnam5kr4wm7G8LYf5hba0MEBZx1A@mail.gmail.com> (raw)
In-Reply-To: <CAKc7PVCy_yUz6Yrxn6xprKohBP=o_zj-pRnJVY-tdsdx=gf3wg@mail.gmail.com>

On Mon, 25 Nov 2019 at 15:22, Sebastian Gniazdowski
<sgniazdowski@gmail.com> 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

      reply	other threads:[~2019-12-05 11:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-25 14:22 Sebastian Gniazdowski
2019-12-05 11:15 ` Sebastian Gniazdowski [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAKc7PVAa7FW9fhiRW0vn_HMnam5kr4wm7G8LYf5hba0MEBZx1A@mail.gmail.com \
    --to=sgniazdowski@gmail.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).