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

Re: option to show file:line everytime echo is called?



Ray Andrews wrote on Tue, Jan 10, 2017 at 09:12:37 -0800:
> On 10/01/17 04:30 AM, Anthony Heading wrote:
> >
> >Maybe use an alias?
> >
> >#!/bin/env zsh
> >alias echo='echo ${0:A}:$LINENO'
> Where can I read up on " ${0:A} ", I haven't seen that construction before.
> And probably there's a host of siblings equally useful.

That's the `:A' modifier applied to the `$0' variable.

:A is in http://zsh.sourceforge.net/Doc/Release/Expansion.html#Modifiers

$0 is in http://zsh.sourceforge.net/Doc/Release/Parameters.html#Parameters-Set-By-The-Shell



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