From 6f0399481b215817960b5cf36ee03a658a2d9b89 Mon Sep 17 00:00:00 2001 From: Juhani Krekelä Date: Sat, 23 Oct 2021 16:25:59 +0300 Subject: Allow user to turn OSC 7 off Currently weltschmerz prefers working directory information obtained from OSC 7 to that from procfs. If a user has not configured their shell to emit OSC 7 escapes, the OSC 7 path may be out of date. Additionally some users want only their shell to change the terminal's conception of working directory, which is a behaviour better matched by the procfs based working directory detection. This change allows OSC 7 based working directory detection to be turned off. The default remains to check OSC 7 first and then fall back to procfs if there is not valid local path set with OSC 7. The reason for turning OSC 7 off entirely instead of inverting the order procfs and OSC 7 are checked in is that procfs based detection should never fail under normal usage on systems that support it. --- weltschmerz.1 | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'weltschmerz.1') diff --git a/weltschmerz.1 b/weltschmerz.1 index 2e0a2fb..aaad053 100644 --- a/weltschmerz.1 +++ b/weltschmerz.1 @@ -49,11 +49,9 @@ The default file manager can be opened in the current directory with .Sy CTRL + Shift + O and a new terminal window with .Sy CTRL + Shift + T . -By default OSC 7 path is used as the current directory, but if OSC 7 path is not -set to a valid local path and the platform provides a Linux-style procfs at -.Pa /proc , -.Nm -will use the child process's working directory instead. +These features require the terminal application to send OSC 7 escape sequences +or for the platform to provide a Linux-style procfs at +.Pa /proc . .Sh SEARCH OVERLAY The search overlay can be opened by pressing .Sy CTRL + Shift + F . @@ -161,6 +159,22 @@ Specifies how many lines of scrollback to keep. A value of -1 means infinite scrollback. The default is .Sy 10000 . +.It Sy prefer-osc7 +When set to +.Sy true , +.Nm +attempts to use OSC 7 to obtain the current directory. +If this does not produce a valid local path, +.Nm +obtains the child process's working directory from +.Pa /proc . +When set to +.Sy false , +only +.Pa /proc +is used. +The default is +.Sy true . .It Sy scrollbar When set to .Sy true , -- cgit v1.2.3-2-gb3c3