Monday, 2 September 2013

history expansion by complete first word

history expansion by complete first word

Consider that I've successfully run these two commands in this order (but
perhaps many commands ago):
~% ssh localhost echo
~% sshfs localhost:/ /media/copy-of-root
Now I would like to rerun the ssh command. My first instinct is to use
!ssh, but this will match the sshfs command instead.
Is there a version of history expansion which will match entire first
words instead of prefixes of commands? If not, is there some other robust
way to choose the ssh command over the sshfs one?

No comments:

Post a Comment