From fc8d0d0b844711764e2d13150aea01e54183cf22 Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Tue, 17 Jan 2017 14:37:38 -0600 Subject: [PATCH] functions/precmd: Support custom terminal titles The `window_title` variable can be set to completely override the title of the terminal window. Alternatively, if the `term_name` variable is set, it will be prepended to the default window title. --- functions/precmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/functions/precmd b/functions/precmd index 1d04794..5f1dbe0 100644 --- a/functions/precmd +++ b/functions/precmd @@ -1 +1 @@ -print -Pn "\e]0;%n@%m:%~ (%y%)\a" +print -Pn "\e]0;${window_title:-${term_name}${term_name:+ - }%n@%m:%~ (%y%)}\a"