Here’s a quick trick I’ve been using for a while, but have found that not many others know about it. It’s a way to grab the arguments from the last command you executed. Command line expansion allows you to do many things, but today we’ll focus on just argument expansion. First to simply repeat the last command with !!. This is most helpful when needing to prefix a command; with something like sudo or bundle exec.
Christopher R Marshall