@nixCraft Again a faux CLI hacker. This avoids retyping the command, and it still works if the command is not in the history:
$((history | grep --only-matching ls || echo ls) | head --lines 1) 😅