Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Can $_ substitute $0 when nofunctionargzero
- X-seq: zsh-users 21664
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Can $_ substitute $0 when nofunctionargzero
- Date: Wed, 15 Jun 2016 18:58:38 +0200
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=W8NLtOO6VQKrnsDaSSGW/A+kskq3SFeapsncTpVysoo=; b=yZPI8zmIuEgcHRadVANX8cmFGGuFUWAIMZmipXpUBaQ/mSHM1ScSz2OrBfC5Y8FJi/ +4nDMnPZXXddIU0pm1/ouzyRXyHydEvOxIXvN3QFhBqgua97OXxP4HAEzfg4OPf7CmB4 0iS5swpiaEBZgS5ziMD4kGQQt3s821UqPr2G6+sBRhJGoXM4zk4Xv/+qiwfFYKYMglqs 9x+M2BME6qokZuXK9KqDX63kg3sgdq+qw3VFxzIcxu3rpUiCJKvEE4+BMeKwLZ27DHGS sud5nGAF3q4oZCct0AmHYrSEx7IJvHWwnPPgq7wg8npU6fSOkLUDBLoVtlU5xiBfyaKN /BoQ==
- In-reply-to: <CAKc7PVC=Sus9AyyjcrkO9E6AiuCGr3mW+ZtCcKQMeES87pqDyQ@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>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVBXdgRVMUrZwvDK93BHycPYC7zeafg0=TNmqYEA=xdn+g@mail.gmail.com> <CAKc7PVAfFPtpJ0APsN-oE2dpvaijd2_h67acgf9TWvgpfGuJ3Q@mail.gmail.com> <CAKc7PVB4y+dw+0Ox76_YTrzwT1C9sRp2=iX1-JkbPQEUQqe77w@mail.gmail.com> <160609134641.ZM4758@torch.brasslantern.com> <CAKc7PVC=Sus9AyyjcrkO9E6AiuCGr3mW+ZtCcKQMeES87pqDyQ@mail.gmail.com>
On 10 June 2016 at 08:12, Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx> wrote:
> On 9 June 2016 at 22:46, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>> $(print -P %N), which works for any zsh of the past 16 years
>> ${(%):-%N}, which has worked for the past 13 years
>> ${funcstack[1]} (or $funcstack[0] if ksharrays), somewhat newer
>
> That's just great, thanks! I already added "0=${(%):-%N}" to my
> plugins. Should have just asked earlier.
Just noted that when recording asciinema video, $0 nor %N do work.
Both contain only file name, without path. Seems pretty weird?
~ Asciicast recording started.
~ Hit Ctrl-D or type "exit" to finish.
# PATH="$PATH:`pwd`"
test_program
0: test_program, ZERO: test_program
# exit
~ Asciicast recording finished.
~ Press <Enter> to upload, <Ctrl-C> to cancel.
^C%
# PATH="$PATH:`pwd`"
# test_program
0: /Users/sgniazdowski/test_program, ZERO: /Users/sgniazdowski/test_program
Best regards,
Sebastian Gniazdowski
Messages sorted by:
Reverse Date,
Date,
Thread,
Author