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

set -x in functions



Hiya,

$ zsh -xc '{ echo a; } 2> /dev/null'
a

$ zsh -xc '{ { echo a; } 2> /dev/null; }'
a

$ zsh -xc 'f() { { echo a; } 2> /dev/null; }; f'
+ f
+ echo a
a

$ zsh -xc 'f() { echo a; } 2> /dev/null; f'
+ f
+ echo a
a

$ zsh -xc 'f() { eval "{ echo a; }" 2> /dev/null; }; f'
+ f
+ eval '{ echo a; }'
+ echo a
a


Why is "+ echo a" displayed in the last 3 cases?


None of the other shells I tried do.

-- 
Stéphane



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