From 1c2cb7fd316b48985c8bc5edbb5644b2d0cc3f4e Mon Sep 17 00:00:00 2001 From: lvgx Date: Wed, 24 Mar 2021 02:20:51 +0100 Subject: [PATCH] Show path in terminal title (#912) * Show path in terminal title * Better terminal window title format Title is now "basename (full/path)" --- src/nnn.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/nnn.c b/src/nnn.c index b5172e7e..89a23ef8 100644 --- a/src/nnn.c +++ b/src/nnn.c @@ -5993,6 +5993,10 @@ begin: setdirwatch(); } + /* Set terminal window title */ + printf("\033]2;%s (%s)\007", xbasename(path), path); + fflush(stdout); + if (g_state.selmode && lastdir[0]) lastappendpos = selbufpos;