Skip to content

Instantly share code, notes, and snippets.

View rodhash's full-sized avatar
:octocat:

Rodrigo Hashimoto rodhash

:octocat:
  • IBM ➜ Kyndryl
  • Taubaté (where strange things happen), SP, Brazil
  • 15:06 (UTC -03:00)
View GitHub Profile
@rodhash
rodhash / imgcat
Created April 26, 2025 05:38 — forked from krtx/imgcat
fix imgcat to be able to display images on tmux https://gitlab.com/gnachman/iterm2/issues/3898#note_14097715
#!/bin/bash
# tmux requires unrecognized OSC sequences to be wrapped with DCS tmux;
# <sequence> ST, and for all ESCs in <sequence> to be replaced with ESC ESC. It
# only accepts ESC backslash for ST.
function print_osc() {
if [[ -n $TERM ]] ; then
printf "\033Ptmux;\033\033]"
else
printf "\033]"