Displays images within the terminal using the ITerm2 Inline Images Protocol.
Requires ITerm2.
- Add the dependency to your
shard.yml:
dependencies:
iterm2:
github: toddsundsted/iterm2- Run
shards install
require "iterm2"
File.open("unicorn.png") do |file|
Iterm2.new.display(file)
endThe #display method also accepts a block and yields an instance of
IO that may be written to. See the documentation for the full API.
- Todd Sundsted - creator and maintainer