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 22342
- From: Peter Stephenson <p.stephenson@xxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: option to show file:line everytime echo is called?
- Date: Tue, 10 Jan 2017 12:28:29 +0000
- Cms-type: 201P
- In-reply-to: <CANri+EwT3h8MkpeKSd-9_QLp9S=TEibmSgjS3r9mv0jY46dQAw@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
- Organization: Samsung Cambridge Solution Centre
- References: <CGME20170110091259epcas5p14d052ee1dc7ebb5c4dd74e4aa02a8d18@epcas5p1.samsung.com> <CANri+EzTiiKkfeDODR8PyBc=khLFONk738sFp7Vpo4uzwKMoXw@mail.gmail.com> <20170110093042.41111f8a@pwslap01u.europe.root.pri> <CANri+EwT3h8MkpeKSd-9_QLp9S=TEibmSgjS3r9mv0jY46dQAw@mail.gmail.com>
On Tue, 10 Jan 2017 03:22:00 -0800
Timothee Cour <timothee.cour2@xxxxxxxxx> wrote:
> Thanks; `set -x` is rather verbose, is there any other way to just alter
> echo to show file:line (or similar) ?
OK, you have an *explicit* echo, and you want to add some more
information to it by hand? You don't want the shell to output
information automatically, as I assumed?
You can output the information from $PS4 by using "print -P". So for
example
print -P $PS4 Got to this bit.
Prompt sequences are expanded but anything else is printed as normal.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author