You can also use esc + . instead of !$. I find more natural and useful if you need to fix a typo.
Even better! Thanks
P.S. For posterity, all of these work just as well in zsh.
We’re a place for programmers to stay up-to-date, learn new skills, and share ideas.
We’ll never post without your permission.