From 35abe88f2cc1cb129a6c9065787fffb7cd21dd04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dani=C3=ABl=20van=20Eeden?= Date: Mon, 2 Aug 2021 05:45:06 +0200 Subject: [PATCH] playground: Set terminal title (#1506) --- components/playground/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/components/playground/main.go b/components/playground/main.go index ab8f083f1e..baabd28fa7 100644 --- a/components/playground/main.go +++ b/components/playground/main.go @@ -595,6 +595,9 @@ func newEtcdClient(endpoint string) (*clientv3.Client, error) { } func main() { + dataDir := os.Getenv(localdata.EnvNameInstanceDataDir) + instanceName := dataDir[strings.LastIndex(dataDir, "/")+1:] + fmt.Printf("\033]0;TiUP Playground: %s\a", instanceName) start := time.Now() code := 0 err := execute()