From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_ADSP_CUSTOM_MED, FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 564abe90 for ; Thu, 5 Dec 2019 11:16:00 +0000 (UTC) Received: (qmail 22821 invoked by alias); 5 Dec 2019 11:15:52 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: List-Unsubscribe: X-Seq: 24492 Received: (qmail 24753 invoked by uid 1010); 5 Dec 2019 11:15:52 -0000 X-Qmail-Scanner-Diagnostics: from mail-vk1-f172.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.102.1/25653. spamassassin: 3.4.2. Clear:RC:0(209.85.221.172):SA:0(-2.0/5.0):. Processed in 0.751459 secs); 05 Dec 2019 11:15:52 -0000 X-Envelope-From: sgniazdowski@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.221.172 as permitted sender) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:content-transfer-encoding; bh=C/r3l+u1eU1lOdcngb30Haie2eOkl7rYvAu7lmbrkKY=; b=BURGE7jTfTI0l6CSi9KeNklUvtSOxm+NKOo/LMyWBR05nnffO+3+HQvHa3K0wwJ2p/ jx4bvcgLE1K014vF7TBRdgAEVME0XsUg27DH4yGaCBRG9HoZkJqSUlqQaLEKAnkpKP8I D8X/7WqvyQOaOF3QGQz7XQOtO6GE573TTbvPdmIa8TSbtg3AcLRxeqjyvg8K/LR++KTJ uA9zKob9O/+gGpQts5ytr8YpQoey+YV8T5Jb6YsFdQ0K7mftEkCa2O6M7/YxG3xopqnn 093EM0neFip17oY9QV/v2RY7gjqMifcYEiIJ46sr+csOrX5Ixadjqv65GG1I76Wg3TGK P66w== X-Gm-Message-State: APjAAAUXDLllbN2N/uWH9ZVd+KoFMvyQ99gBWOOKaCT5sonhjzYhdEtW 8aSibU017ZlwxqO8tE/UkisShmqEgu27f9ZzzPDf+a+D X-Google-Smtp-Source: APXvYqxcuQyZWllLI2ICMwVEjWyeSZdKYzvED5ohJAisHJmKHkCBEos2teCuVBDucBrhAn13sy2QG5mb/g74iEvMYjg= X-Received: by 2002:a1f:8fd3:: with SMTP id r202mr6184389vkd.77.1575544518742; Thu, 05 Dec 2019 03:15:18 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: Sebastian Gniazdowski Date: Thu, 5 Dec 2019 12:15:09 +0100 Message-ID: Subject: Re: A way to write type-agnostic script/function runnables To: Zsh Users Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 25 Nov 2019 at 15:22, Sebastian Gniazdowski 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 =E2=86=92 if the object is being run as a function, then i= t has access to the in-session parameters =E2=80=93 and why hesitate to lever= age this? So in short, the PLUGIN_NAME_DIR parameter is a good solution, there's no need for querying the autoload's storage directory. --=20 Sebastian Gniazdowski News: https://twitter.com/ZdharmaI IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin Blog: http://zdharma.org