Some styles cause shell styles to break
dark-panda opened this issue · 8 comments
Styles 17, 18, 19, 20, and 21 cause shell styles to sort of carry on their styling even after the pspg process exits. In my shell, I have the ls
command aliased to ls --color=auto
, and after using pspg with any of these themes, the colours for my shell persist even after pspg exits.
Here's how my shell should look:
Here's how it looks when you use any of the affected styles, with only the colours varying between styles:
The colours on the directories for instance are incorrect after running the pspg command with style 17.
What is your platform? What version of ncurses do you use? I cannot to reproduce on my FC36.
Can you check the commit f9ff69f ?
Platform: macOS 12.6
Shell: zsh 5.9
Terminal: iterm2 3.4.16
ncurses version: 6.3
The issue still appears with this commit. I've poked around a bit though, and it appears to be connected with calls to deftheme_rgb
, as commenting out the code in that function specifically appears to work, at least in the sense that the issue itself no longer persists, but obviously the theming no longe works.
Please can you try this workaround - 70d3f38 ?
What is an output, when you run pspg (with this commit) with an argument --version
?
Unfortunately, In terminals I cannot to save current state of colours and I cannot to revert to some state. I don't have macos, so I a not able to reproduce this issue. You can try to use an option --on-exit-reset
too, Maybe it can help.
please, can you check last workaround?
@okbob Still appears to have the issue. The --on-exit-reset
option does indeed clear up the issue, however.
@okbob that --on-exit-reset
option works just fine so I'll be using that moving forward, thanks.
@dark-panda I implemented new option --on-exit-sgr0
. Can you check it (without --on-exit-reset
)? It is in master branch.