Skip to content

Conversation

chrisant996
Copy link
Contributor

Cmder's hg prompt didn't use async prompt filtering yet.
Cmder's svn prompt only used async prompt filtering if a special config variable was set (the commit which contributed it seems to have misunderstood the git config settings for the git async prompt).

This commit makes the following changes:

  1. Adds async prompt filtering for hg.
  2. Makes async prompt filtering for svn the default.
  3. Removes the prompt_overrideSvnStatusOptIn variable.
  4. Fixes a bug where any errors during svn status in the svn prompt accidentally show up in the terminal.
  5. Fixes a bug where any errors during hg branch in the hg prompt turn into Lua errors.
  6. Simplifies the code for colors in the hg and svn prompts.
  7. Clean up the svn prompt code and make it consistent with the git and hg prompt code.

Cmder's hg prompt didn't use async prompt filtering yet.
Cmder's svn prompt only used async prompt filtering if a special config
variable was set (the commit which contributed it seems to have
misunderstood the git config settings for the git async prompt).

This commit makes the following changes:
1.  Adds async prompt filtering for hg.
2.  Makes async prompt filtering for svn the default.
3.  Removes the prompt_overrideSvnStatusOptIn variable.
4.  Fixes a bug where any errors during `svn status` in the svn prompt
    accidentally show up in the terminal.
5.  Fixes a bug where any errors during `hg branch` in the hg prompt
    turn into Lua errors.
6.  Simplifies the code for colors in the hg and svn prompts.
7.  Clean up the svn prompt code and make it consistent with the git
    and hg prompt code.
@chrisant996
Copy link
Contributor Author

I tested these changes locally in a git dir, a hg dir, a svn dir, and a normal dir (no source control repo).

Copilot

This comment was marked as outdated.

@DRSDavidSoft DRSDavidSoft self-assigned this Sep 5, 2025
If the hg program is not found, then there used to be a Lua script
error.  I fixed that in the earlier commit in this PR.  But the fix
was incomplete, and the hg prompt still appended " ()" instead of
not appending anything (which is how the svn prompt behaves when
the svn program is not found).
@chrisant996
Copy link
Contributor Author

I installed Mercurial and Subversion and did some deeper testing of the Cmder prompt for both.

I found one additional pre-existing bug, so I added a fix into this PR as well.

If the hg program isn't found, then the hg prompt was appending () to the prompt, but it shouldn't append anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
👆 clink Upstream issue in clink. 🎨 Type: Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants