From ce6cfd46aa7fd5ae65bf38fef090d6e54d4261e5 Mon Sep 17 00:00:00 2001 From: Ehsan Ghorbannezhad Date: Thu, 30 Jun 2022 19:13:25 +0430 Subject: [PATCH] set the terminal window title set the title of the terminal window to 'bashmount' and reset it to the previous state on exit. --- bashmount | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bashmount b/bashmount index 26d37c9..fc689f9 100755 --- a/bashmount +++ b/bashmount @@ -37,6 +37,10 @@ if (( $# > 0 )) && [[ "$1" == "-v" || "$1" == "--version" ]]; then exit 0 fi +# Change the terminal title and reset it on exit +printf '\e[22t\e]0;bashmount\a' +trap 'printf "\e[23t"' EXIT + declare -ri EXIT_CMDNOTFOUND=127 declare -ri EXIT_CONFIG=78