Terminfo [seems to provide](https://invisible-island.net/ncurses/terminfo.ti.html#toc-_X_T_E_R_M__Features) `Ms` for this case so it can be feature detected and used pretty easy: ```bash test -n "$(tput Ms)" && tput Ms c "$(printf "%s" "enjoy your new clipboard content" | base64 --wrap=0)" ```