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 "#{_}"`
Written by Taylor Fausak
Related protips
2 Responses
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
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Related Tags
#ruby
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#