« first day (2363 days earlier)      last day (2582 days later) » 

2:43 PM
Does anyone face this problem in zsh
0
Q: Why zsh precommand modifiers stop accepting arguments if quoted?

cuonglmzsh has precommand modifiers, which precede a command to alter how command is interpreted. Some of them are command and exec. $ zsh -c 'exec -a foo zsh -c "print -- \$0"' foo $ zsh -c 'command -v ls' /bin/ls But they stopped accepting arguments if quoted: $ zsh -c '\exec -a foo zsh -c "print ...

 
zsh -c '\exec -a foo zsh -c "print -- \$0"' gives me the same error as yours
however \exec -a foo zsh -c "print -- \$0" in a zsh shell works (and closes the shell immediately)
don't know what to think about it to be honest
 
exec replace the shell with the new command zsh -c
zsh -c finish and quit immediately
 
2:59 PM
yes, I understand that part
but I don't understand why the first command does not do the same thing as the second one
 
because it wraps in another zsh -c
 
Ah, got it. So actually, the second command probably gives the same error as the first one, we just don't get to see it because the shell closes right away
 

« first day (2363 days earlier)      last day (2582 days later) »