Skip to content
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

Feature request: provide easy way to give a more fully Linux-like prompt #1570

ghost opened this issue May 21, 2018 · 3 comments

Feature request: provide easy way to give a more fully Linux-like prompt #1570

ghost opened this issue May 21, 2018 · 3 comments


Copy link

@ghost ghost commented May 21, 2018

Surely many people, including me, would like an all-in-one-line, Linux-like prompt, in ConEmu.

True, it's easy enough to use the PROMPT variable to set the prompt to username-and-directory, but doing so (without further refinements) loses the colour. It's true also that the default ConEmu prompt is a coloured username-and-directory, but it does put the caret on the next line, after a >, and that latter, to those used to Linux, suggests that one has typed an incorrect command.

At the least something on the relevant documentation page on how to remove the > and the newline would be appreciated.

Copy link

@jpwilksch jpwilksch commented Jun 5, 2018

I agree it takes some getting used to. However, in recent times I've seen a number of default Linux prompts also using the two-line format.

If you'd like the cmd prompt without a newline:

  1. Edit %ConEmuBaseDir%\CmdInit.cmd
  2. Remove the leading "$_" (newline/carriage return) from ConEmuPrompt2 on the two lines it is set

eg. Change
set ConEmuPrompt2=$_$E[90m$G
set ConEmuPrompt2=$E[90m$G

Additionally, you can replace ">" with "$" by substituting $$ for $G on the same lines.

Note this file will be overwritten when you update ConEmu, so you should probably copy it to a new file in the same directory and make the updates there. You'll also need to update your {cmd} Tasks to reference the new file.

@Maximus5 Maximus5 added this to To Do in ConEmu via automation Jun 5, 2018
Copy link

@ghost ghost commented Jun 5, 2018

Thanks Maximus5. However, the instructions you provide are somewhat involved. Hence, I think that my original request - viz., 'provide easy way to give a more fully Linux-like prompt' (stress added) - stands.

Copy link

@Maximus5 Maximus5 commented Jun 6, 2018

The answer was from @jpwilksch ;)

I consider to do following changes

  • replace > with $ and $ with #
  • support some flags from environment, e.g. set ConEmuPromptNL=NO or set ConEmuPromptNames=NO
Maximus5 added a commit that referenced this issue Jun 12, 2018
  When you run `{cmd}` task or any other task utilizing `CmdInit.cmd`
  you may set configuration variables on the Environment settings page:

  * `set ConEmuPromptNL=NO` - use one-line prompt;
  * `set ConEmuPromptNames=NO` - don't print `user@pc`.
@Maximus5 Maximus5 moved this from To Do to Ready for Testing in ConEmu Jun 17, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Ready for Testing
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants