Command Line Archive

Command-Line

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.

Image

Christopher R Marshall

@codegoalie

Enjoys programming web applications; especially in Ruby and Go. Also enjoys playing ice hockey as a goalie and playing the guitar.

Recent Posts

Categories