% zsh -c "printf -v result \" %5'd\""
zsh:printf:1: %5': invalid directive
zsh(41890,0x7ff8450ddfc0) malloc: *** error for object 0x600002c811e0: pointer being realloc'd was not allocated
zsh(41890,0x7ff8450ddfc0) malloc: *** set a breakpoint in malloc_error_break to debug
zsh: abort zsh -c "printf -v result \" %5'd\""
% zsh -c "printf \" %5'd\""
zsh:printf:1: %5': invalid directive
%
% zsh -c "printf -v result \"%5'd\""
zsh:printf:1: %5': invalid directive
% zsh -c "printf -v result \" %5'd\"; echo foo"
zsh:printf:1: %5': invalid directive
foo