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

Unexpected behavior of P parameter expansion flag inside arithmetic evaluation



% a=(abc)
% (( r = $#a )); echo $r
1
% b=a
% (( r = ${#${(P)b}} )); echo $r
3
% (( r = ${#${(P@)b}} )); echo $r
1

Why is the ‘@’ needed in this case?



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