When trying to use for example visudo with nano and doing it with sudo, sudo handles it just fine when written as sudo EDITOR=nano visudo. doas on the other hand complains doas: EDITOR=nano: command not found when attempting to run doas EDITOR=nano visudo
That is just not supported, doas will execute the command as a command.
If you want to use variables, like in a shell, use the shell or allow the rule to pass through variables.
When trying to use for example
visudo
withnano
and doing it withsudo
, sudo handles it just fine when written assudo EDITOR=nano visudo
.doas
on the other hand complainsdoas: EDITOR=nano: command not found
when attempting to rundoas EDITOR=nano visudo