-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prevent other apps from overwriting the prompt? #749
Comments
The multiline bug is in cmdr.lua get_git_status() caused by using os.execute(). I used io.popen instead here and it is fixed |
Suffering from the same double line bug here and using |
I can also confirm that the extra-line bug is gone when using |
Ok, waiting for news on #736, as that would conflict with this PR... |
I've a working solution which sets the prompt in my personal
|
@vladimir-kotikov Would you give your latest clink scripts to cmder? It fixes the multiline bug and you added lots of new stuff too :) |
cmder already comes with clink-completions 0.2.1 in the dev branch |
@Stanzilla Unless theres a branch i cant see, I dont think that's correct, it looks like clink-completions in cmder are from March 2015, dating back to the initial birth of clink-completions. The author has changed to disuse os.execute() shortly after that, but we still have the old code in cmder.lua and this bug exists. |
@vvartivarian-nbcu See sources.json here https://github.com/cmderdev/cmder/tree/development |
@vvartivarian-nbcu, how is it fixes that? The problem is in the https://github.com/cmderdev/cmder/blob/master/config/cmder.lua#L139, which is a part of Cmder |
@Stanzilla Can someon from the core team chime in here: would it be ok to add a failsafe to the cmder.lua file which looks for I could also remove the prompt call from init.bat and handle the stuff completely from cmder.lua... The code is some variant of
|
If having a long line of input in histroy, which went on into the second row and using <up> to get back to it, you got the effect that the input was split over three lines: "text, empty, text", but using the arrows do move to the front of the first line was moving the cursor in the second (empty) row. You could change the text, but you needed to do it "in the dark". No idea why s/os.execute/is.popen/ fixes this, but it does. Partly adresses cmderdev#749
The git problem with long lines and using history is in #756 |
Hrm is that really generic workaround or more like a Conda workaround? |
I suspect that there are more apps which set the prompt to indicate a current status but in my daily usage, its just conda. virtualenv also does it: https://github.com/pypa/virtualenv/blob/develop/virtualenv_embedded/activate.bat |
after the latest conda update, I now have the following in my config/user.lua (needs the changes in the next release...):
For how to add a conda environment information: see here: http://stackoverflow.com/a/34066161/1380673 |
If there shouldn't be a "reset" of the prompt or maybe even setting the prompt value directly in the lua code, then this issue can be closed |
Another argument for doing the complete prompt work in lua: if you start a new cmd in a comder window, the prompt is ugly:
-> no replacements of This is one of my private setups where I implemented the above workaorunds and temporary disabled the prompt call in
The colors are still broken (at least the first prompt from cmder doe snot retain it's green), but the second cmdline (which is from cmd, does not has a line break) does not include cmder stuff... |
If having a long line of input in histroy, which went on into the second row and using <up> to get back to it, you got the effect that the input was split over three lines: "text, empty, text", but using the arrows do move to the front of the first line was moving the cursor in the second (empty) row. You could change the text, but you needed to do it "in the dark". No idea why s/os.execute/is.popen/ fixes this, but it does. Partly adresses cmderdev#749
Is there a way to prevent other programms from overwriting the prompt? I've
conda
, which adds the current environment to the start (and resets the cmder prompt back to the default) but also make the prompt behave very badly when I use 'up' to navigate to previous multiline commands (see screenshot: empty line between first and last and cursor in the empty line; I can edit, it just doesn't show up in the right place)The text was updated successfully, but these errors were encountered: