Created
October 10, 2022 12:31
-
-
Save trygveaa/e304621f53c62c792864faeedfddb86b to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/bash | |
title="$1" | |
body="${2/&/&}" | |
body="${body/</<}" | |
body="${body/>/>}" | |
if [ -n "$TMUX" ]; then | |
printf '\ePtmux;\e\e]99;i=1:d=0;%s\e\e\\\e\\' "$title" >/dev/tty | |
printf '\ePtmux;\e\e]99;i=1:d=1:p=body;%s\e\e\\\e\\' "$body" >/dev/tty | |
else | |
printf '\e]99;i=1:d=0;%s\e\\' "$title" >/dev/tty | |
printf '\e]99;i=1:d=1:p=body;%s\e\\' "$body" >/dev/tty | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment