t-rec is another great tool, which can record any window and produce a video or a gif.
Not quite the same thing, but sometimes I find it easier if I just want to share a gif of a terminal.