Menu

#45 Colour reset after command

open
nobody
None
1
2015-04-10
2013-06-17
No

After executing a command the console colors seem to be reset to black-on-black sometimes.

Discussion

1 2 > >> (Page 1 of 2)
  • Horea Haitonic

    Horea Haitonic - 2013-06-17

    I got similar reports from some colleagues here at work, but we could never find a deterministic way of reproducing this problem; did you find one?

    Also, are you running PyCmd.exe by itself, or within Console2? (this might be relevant)

     
  • Matthias Stevens

    Hi Horea,
    I've not been able to reproduce this in a reliable way. It happens quite a lot but I've not been able to narrow it down to particular commands/executables.
    However, it seems to happen especially with commands that take a while too run (although I'm not certain).

    I'm using pycmd.exe by itself. I use v0.9 and I haven't seen this happening with earlier versions.

    I don't know if it matters but I should mention that I do not use the default white-on-black console window colours. Instead I use black-on-grey.

    When the problem happens only new lines are affected, lines above and the empty space around the new lines stay (black-on-)grey. In fact the affected new lines are not entirely black-on-black: the prompt is grey-on-black and what follows is black-on-black.
    (See screenshot)

    I'm willing to try stuff out for you if that helps.

    Best,

    Matthias

     
    • Horea Haitonic

      Horea Haitonic - 2013-06-17

      I'd wager that the problem would appear after running commands that do color manipulations (git is one if configured to use colors, keystore might use it as a trick to input a hidden password -- it would admittedly be a stupid trick, so this is maybe far fetched).

      Can you confirm this (at least informally, as a "feeling")? Can you somehow correlate the corrupted colors to using commands that produce colored output?

       
  • Matthias Stevens

    I don't believe I've seen it with git but I rarely use it on the command line.
    I have however seen it a lot with Ant (and associated compilation tasks). I'm not sure there were color changes in there though.
    If you wnat me to run a particular command that is known to use colors, let me know.

    -M.

     
  • Matthias Stevens

    I don't it is related to color manipulations. I now saw it happen with plain "dir" and "ls" (cgywin) commands.
    What is strange though is that it doesn't seem to happen in all directories.

     
  • Horea Haitonic

    Horea Haitonic - 2013-06-17

    Can you send me the contents of your init.py (if any)?

     
  • Matthias Stevens

    Where can I find that? It's not in C:\Users[username]\AppData\Roaming\PyCmd\

     
    • Horea Haitonic

      Horea Haitonic - 2013-06-17

      PyCmd first searches it in its installation directory (i.e. next to PyCmd.exe), then in \AppData\Roaming\PyCmd.

      But if you didn't create it yourself (in either of the two locations), it means you don't have any (and therefore using defaults).

       
  • Matthias Stevens

    In that case I don't have one

     
  • Horea Haitonic

    Horea Haitonic - 2013-06-20

    Can you please check the contents of the %APPDATA%\PyCmd\tmp directory? How many files do you have there? e.g. only a few? a few tens? a few hundreds? a few thousands?

     
    • Matthias Stevens

      I have 260 files in that folder, totalling to just under 1 MB.

       
  • Horea Haitonic

    Horea Haitonic - 2013-06-21

    My colleague reports that things have been getting worse in time, i.e. the behavior started appearing more and more often. Can you confirm this?

    Note: I still have no idea what could be causing this :( I am only shooting questions all around trying to pick-up something -- my apologizes for the annoyance.

     
  • Matthias Stevens

    That seems more or less consistent with what I'm seeing. I don't think I ever saw it with version prior to v0.9. However it didn't suddenly start happening after I installed v0.9.
    I don't remember exactly when I first saw it but it is definitely happening a lot more now.

     
  • Horea Haitonic

    Horea Haitonic - 2013-06-26

    I still don't understand what is going on, my colleague that encountered the problem told me he got rid of it by switching from Console2 back to the regular cmd -- this makes everything even more confusing.

    Can you try to remove the tmp files we discussed above? they are the only thing that I know to "accumulate" over time.

     
  • Matthias Stevens

    Hi, I'm sorry for thel ate answer. The reason is that for a reason that's beyond me I haven't seen the problem the last week or 2, even though I have not yet deleted those files. However I think I have also done less command line work lately.
    So if the problem it pops up again I will try to delete those files and see if that solves the problem. I'll keep you posted.

     
  • Matthias Stevens

    Hello,
    The problem has come back (I don't know why), and it happens very frequently now. I've tried deleting the temp files (of which I had about 350) as you suggested, but it makes no difference. The problem is still there.
    The problem happens more than ever now (often after the first or second command I type in a frech cmd.exe window). Also the problem does not seem to be related to the execution time of the command (as I had suggested earlier).
    If you have more ideas or things you want me to try, now is the time :-).

     
  • Matthias Stevens

    For some reason the problem seems to be gone again now. It really baffles me. Last week it had gotten to the point of making PyCmd effectively unusable (color reset after every first command in a fresh window). And now everything is back to normal. I can't think of anything that might explain the change...

     
  • Horea Haitonic

    Horea Haitonic - 2013-09-19

    I asked my colleague and he has not seen the problem in more than a month; for him as well, it disappeared as suddenly as it appeared.

    This makes for at least 3 completely baffled people :|

     
  • Jacek Nowosielski

    I am able to reproduce it by pressing Enter and some letters at the same time very fast...

     
  • bdumitriu

    bdumitriu - 2013-10-01

    I upgraded to PyCmd 0.9 a couple of days ago and also hit this issue. And it was maddening enough that I logged in to post this :)

    For me it's clearly linked to manipulation of the color by git. I have

    [color]
            ui = true
    

    in my .gitconfig and PyCmd's colors are messed up after every git command that manipulates the color. I also was using it in Console2 and went back to cmd.exe to get rid of the issue.

    As I was writing this I got the idea to try PyCmd 32 bit before hitting 'Post' (I was using the 64 bit version) and that fixed the issue for me, even if used in the 64 bit Console2. So hopefully this is a clue in the right direction.

     

    Last edit: bdumitriu 2013-10-01
  • Matthias Stevens

    Any news about this?
    I don't think it is related to git as such, since I get the problem when running command that have nothing to do with git.

     
  • Matthias Stevens

    A possible clue: I have seen this problem in plain cmd.exe windows by also when using pycmd with ConEmu (http://code.google.com/p/conemu-maximus5).

     
  • Andrea Zagli

    Andrea Zagli - 2015-02-06

    i confirm that the problem is only for 64bit version; i tried it in conemu and in console2

     
  • Horea Haitonic

    Horea Haitonic - 2015-02-09

    What happens if, after the problem occurs, you try to manually override the current color settings: e.g. type "color 3a<Enter>"?

     
  • Matthias Stevens

    OK, I'll try that next time I see the problem happening.

     
1 2 > >> (Page 1 of 2)

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.