From: lvgx Date: Wed, 24 Mar 2021 01:20:51 +0000 (+0100) Subject: Show path in terminal title (#912) X-Git-Tag: v3.7~50 X-Git-Url: http://www.git.stargrave.org/?a=commitdiff_plain;h=1c2cb7fd316b48985c8bc5edbb5644b2d0cc3f4e;p=nnn.git Show path in terminal title (#912) * Show path in terminal title * Better terminal window title format Title is now "basename (full/path)" --- 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;