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

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



Timothee Cour wrote on Tue, Jan 10, 2017 at 03:22:00 -0800:
> Thanks; `set -x` is rather verbose, is there any other way to just alter
> echo to show file:line (or similar) ?

% echo() { set -x; builtin echo "$@" }
% setopt promptsubst
% PS4='$functrace> ' 
% source =(<<<$'print foo\nf(){\necho bar\n}\nf\n')
foo
f:1 /tmp/zshqKiKeo:5 zsh:9> echo bar
bar

See zshmodules(1) for $functrace.

Cheers,

Daniel



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