Not possible. You can have it select an enemy target then switch back to your current target, but you can’t do nearest enemy without switching targets.
#showtooltip
/targetenemy [nomod,noharm]
/cast [mod:shift,@focus,harm,nodead] [] Rebuke
/targetlasttarget [nomod]
Gets janky if you’re already targeting an enemy because you can’t tell if your original target was an enemy or ally by the time you get to the /targetlasttarget
.
These is better options imo.
#showtooltip
/cast [mod:shift,@focus,harm,nodead] [@mouseover,harm,nodead] [harm] [@mouseovertarget,harm,nodead] [@targettarget,harm,nodead] [] Rebuke