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

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



thanks!

On Tue, Jan 10, 2017 at 4:30 AM, Anthony Heading <ajrh@xxxxxxxx> wrote:

> On Mon, Jan 09, 2017 at 03:55:08PM -0800, Timothee Cour wrote:
> > is there an option to show file:line everytime echo is called? eg:
> > echo myvr=$myvar #assuming this is at line 19
> > #shows:
> > /home/timothee/.zshrc:19 myvar=FOO
>
> Maybe use an alias?
>
> #!/bin/env zsh
> alias echo='echo ${0:A}:$LINENO'
>
> myvar=FOO
>
> echo myvr=$myvar #this seems actually to be line 6
>
>
> prints
>
> /home/ajrh/x:6 myvr=FOO
>


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