Skip to main content
Post Closed as "Duplicate" by slhck
added 65 characters in body
Source Link
spuder
  • 10k
  • 4
  • 43
  • 57

There are times when I want to take the previous command's parameters and apply them to the current command.

Here is an example

$ locatecat foo.txt
~/foo.txt
$ vim ~/foo.txt

I'd like to find a shortcut to not have to type out ~/foovim foo.txt

There are times when I want to take the previous command's parameters and apply them to the current command.

Here is an example

$ locate foo.txt
~/foo.txt
$ vim ~/foo.txt

I'd like to find a shortcut to not have to type out ~/foo.txt

There are times when I want to take the previous command's parameters and apply them to the current command.

Here is an example

$ cat foo.txt
$ vim foo.txt

I'd like to find a shortcut to not have to type out vim foo.txt

Source Link
spuder
  • 10k
  • 4
  • 43
  • 57

pass previous command's arguments to current command

There are times when I want to take the previous command's parameters and apply them to the current command.

Here is an example

$ locate foo.txt
~/foo.txt
$ vim ~/foo.txt

I'd like to find a shortcut to not have to type out ~/foo.txt