Show path in terminal title (#912)

* Show path in terminal title

* Better terminal window title format

Title is now "basename (full/path)"
This commit is contained in:
lvgx 2021-03-24 02:20:51 +01:00 committed by GitHub
parent f90e567a17
commit 1c2cb7fd31
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -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;