From f2311bddc182e321035fdab49cdf2db08b4c1f63 Mon Sep 17 00:00:00 2001 From: Fernando Schauenburg Date: Fri, 4 Dec 2020 12:08:16 +0100 Subject: [PATCH] style(bash): describe common terminal control sequences --- roles/bash/files/profile | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/roles/bash/files/profile b/roles/bash/files/profile index 9ae1886..ebd59d6 100644 --- a/roles/bash/files/profile +++ b/roles/bash/files/profile @@ -201,6 +201,25 @@ alias myip="curl -s https://ifconfig.co" alias light='_update_colors light' alias dark='_update_colors dark' +############################################################################## +# Terminal color management +############################################################################## + +# Useful terminal control sequences: +# +# Sequence Abbrev Description +# ----- ----- ----------------------------- +# ESC P DCS Device Control String +# ESC [ CSI Control Sequence Introducer +# ESC \ ST String Terminator +# ESC ] OSC Operating System Control +# +# +# More info at: +# * https://www.xfree86.org/4.8.0/ctlseqs.html +# * https://vt100.net/ +# * https://iterm2.com/utilities/imgcat + _send_osc() { local OSC ST if [ -n "$TMUX" ]; then