lazygit: WARNING terminal is not fully functional, but sometimes it is?
Describe the bug Here is a picture of the issue.
As you can see, the subwindow is showing the error message
WARNING: terminal is not fully functional
However, if I press ENTER on the file in my FILES view, I am able to view and interact with my changes as expected.
To Reproduce
- Open up LazyGit
- Press enter on a file to change the view of the second window
- See that it is working
- Press escape and leave that view to see it being broken again.
Expected behavior It shows the correct window
Version info:
commit=, build date=, build source=nix, version=0.42.0, os=linux, arch=amd64, git version=2.45.1
git version 2.45.1
About this issue
- Original URL
- State: open
- Created 2 years ago
- Reactions: 2
- Comments: 22
In my case, I delete “useConfig” option located at Library/Application\ Support/lazygit/config.yml(location differ on other OS).
before:
after:
I just delete useConfig:true, and it worked.
@zamlz In my case, it was due to lazygit configuration located at
Library/Application\ Support/lazygit/config.yml(location differ on other OS).I just delete all configuration, and problem is solved.
@aksh1618 This all makes sense; I wasn’t around yet when the pager PR was done, so I can only guess, but I speculate that the only reason for including
$PAGERis that git does that too. Like with$GIT_EDITORand$EDITOR.Your proposed fix of skipping
$PAGERmakes sense to me.However, I will also say that I don’t see a lot of value in the
useConfig: truesetting in the first place, where we need to tweak the config into one that works for us (by stripping| less, but what if they use a different pager like Moar, or pass options to less, or don’t have a space between|andless, etc. etc.?).I wouldn’t mind if we got rid of the
useConfigoption, and let users specify exactly what they want to use in lazygit. This would get rid of this whole class of problems.I can’t decide this though, so I hope @jesseduffield sees this (he’s pretty busy these days). Reopening for now.
I ran into this today and went looking, and I think I’ve found the cause: the current logic for
useConfig: trueseems to be as follows:$GIT_PAGER, if empty try$PAGER, if empty try the value ofcore.pagerset in git configNow, for most folks
$PAGERis likely to be set toless(try it: runecho $PAGERin your terminal). This thus leads to an attempt to uselessas the pager, which is known to not work well with lazygit:@jesseduffield What was the reason for using
$PAGER? I tried looking at the relevant PR but couldn’t find any comment about it. In my understanding this is variable is not related to git directly and is quite likely to be set toless. If there is no specific reason, can we skip looking at the value of$PAGERand instead directly go from$GIT_PAGERto git config?(Hey @zamlz, would you mind re-opening this issue, so that the discussion here can continue until this is resolved in some way?)
Thanks for the detailed reply @stefanhaller!
For me the value proposition of
useConfigis that lazygit automatically updates whenever I modify the pager used in git, which is admittedly not a mjor one as it’s a pretty rare thing to do.However, I agree with you that this could potentially turn into a never ending rabbit hole of edge cases as we’re entering command parsing territory here! So removing the
useConfigoption seems like the way to go to me as well, in its current form at least.(No worries @zamlz, you reserve the right to close as the author as you deem fit!)
Same for me.
For me it was the
pager: "less"config option I had that was creating the error.Leaving pager empty with
pager: ""fixes the problem.