]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lib/pager: Add LV support
authorTobias Stoeckmann <tobias@stoeckmann.org>
Thu, 26 Feb 2026 21:10:40 +0000 (22:10 +0100)
committerTobias Stoeckmann <tobias@stoeckmann.org>
Thu, 26 Feb 2026 21:10:40 +0000 (22:10 +0100)
Set LV environment variable to "-c" for lv support.

Taken from https://github.com/git/git/commit/e54c1f2d2533c5406abeb8e3e0cf78c68ca9c21e

Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
lib/pager.c

index f8383ff52c590d20dfb22a2c1cee715f790460e4..54fbb5bf949f41e5891cc7a606a3b56b4a83111d 100644 (file)
@@ -69,6 +69,8 @@ static void pager_preexec(void)
 
        if (getenv("LESS") == NULL && setenv("LESS", "FRSX", 0) != 0)
                warn(_("failed to set the %s environment variable"), "LESS");
+       if (getenv("LV") == NULL && setenv("LV", "-c", 0) != 0)
+               warn(_("failed to set the %s environment variable"), "LV");
 }
 
 static int start_command(struct child_process *cmd)