Last Updated: February 25, 2016
·
863
· taylorfausak

Open the result of the last command

I often find myself generating files through the Ruby console. I generally want to open them after creating them, but I usually forget. This command opens the return value of the last command with the default program:

`open "#{_}"`

2 Responses
Add your response

i often wonder why shoud any1 use "#{_}" instead of plain _? perhaps this is one of valid cases for such syntax.

over 1 year ago ·

I use "#{_}" because it's possible for the filename to contain a space.

over 1 year ago ·