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

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



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