Created
August 13, 2016 06:22
-
-
Save joekarma/2b1decb25e7a9aa1dff077df996134c9 to your computer and use it in GitHub Desktop.
iTerm.app can display images, including gifs. Cool!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%w(open-uri base64).each { |lib| require lib } | |
# iTerm rocks! | |
img_url = "http://i.imgur.com/y9Rhu9i.gif" | |
if ENV["TERM_PROGRAM"] == "iTerm.app" # yay! | |
puts "\e]1337;File=inline=1:" + Base64.encode64(open(img_url).read) + "\a\n" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment