From 7859bfab0db3f2f4a6c07b9fc4783fdcd8bf1cef Mon Sep 17 00:00:00 2001 From: robin Date: Fri, 13 Sep 2024 08:08:56 +0000 Subject: [PATCH] Update bash.bashrc tn() bash function to change the name of a terminal --- bash.bashrc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bash.bashrc b/bash.bashrc index befd258..c1d374a 100644 --- a/bash.bashrc +++ b/bash.bashrc @@ -10,6 +10,11 @@ esac export EDITOR=vi +# Macro for terminal/tab name i.e. $ tn "NameOfTab" +tn() { + echo -ne "\033]0;$1\007" +} + # don't put duplicate lines or lines starting with space in the history. # See bash(1) for more options HISTCONTROL=ignoreboth