Open latest screenshot in Preview.app
If you use capybara-screenshot gem maybe useful have possibility to quickly open latest screenshot from this tool. To do so, you should create next file:
bin/latest_screenshot
#!/bin/bash
file="$(ls tmp/capybara/*.png | tail -1)"
open $file -a /Applications/Preview.app
Add execution permission for this file:
chmod +x bin/latest_screenshot
And now you can easily open latest screenshot with next command:
bin/latest_screenshot
Written by Pavel Druzyak
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#