Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: option to show file:line everytime echo is called?
- X-seq: zsh-users 22343
- From: Anthony Heading <ajrh@xxxxxxxx>
- To: Timothee Cour <timothee.cour2@xxxxxxxxx>
- Subject: Re: option to show file:line everytime echo is called?
- Date: Tue, 10 Jan 2017 07:30:02 -0500
- Cc: zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=ajrh.net; h=cc :content-type:date:from:in-reply-to:message-id:mime-version :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=zTCcz9npWFlQqnHiIS4NBYUSpOE=; b=jMXUJm SmxhaqbJfn3xBjQOthiD8hjVAcE595g6nDQ++IqRQXp2XdGPyXV5nqRr5oCuXs+A Lfbrzy1D3C8x2R98XAroxKGtKtWrC+IVZAabq8oyK/7mPeg0PbszhUjthbOYZram uyhs6ySfVHArv6t/NGuchi1gckzU9XUZho3Ws=
- Dkim-signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=zTCcz9npWFlQqn HiIS4NBYUSpOE=; b=Le6s1PNCesZ2GmQMhRLQe92Xpk5cTjuFKBjDLpJbM1XZt9 VrNmRmaqjye+BmCjOl4rjK7FSg596N36RUKB14RQ8kzBJ2qvyh+ZLrqKjy8Eio4b qcV1jJq1IORrArg8OZfVitGSyQdlf/NUejf+vl2IqNT0K1Iz1TLjBYvuk2I8w=
- In-reply-to: <CANri+EzTiiKkfeDODR8PyBc=khLFONk738sFp7Vpo4uzwKMoXw@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: <CANri+EzTiiKkfeDODR8PyBc=khLFONk738sFp7Vpo4uzwKMoXw@mail.gmail.com>
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