Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In ConEmu is it possible to get the command prompt all in one line?

Just started using conemu on windows again (after quite some time using other rubbish). Its great, but there is one element that really bugs me, that is the command prompt is always spread over two lines:

user.name@DESDAH181093 D:\user\workspace\
>
user.name@DESDAH181093 D:\user\workspace\
>
user.name@DESDAH181093 D:\user\workspace\
>

Can I get it so that this is compressed onto the same line, like this?

user.name@DESDAH181093 D:\user\workspace\>
user.name@DESDAH181093 D:\user\workspace\>
user.name@DESDAH181093 D:\user\workspace\>

I looked through the settings and did not spot anything obvious.

I saw this question: link, but I think I want to do the opposite and I can't find where anything like ${cwdfull}\n> is defined in the settings...

UPDATE

In addition to the answer of Max, here is what I really needed to change in the CmdInit.cmd file:

rem Carriage return and `$` or `>`
rem Spare `$E[90m` was specially added because of GitShowBranch.cmd
if "%ConEmuIsAdmin%" == "ADMIN" (
  set ConEmuPrompt2=$S$E[90m$$
) else (
  set ConEmuPrompt2=$S$E[90m$G
)

Where both ConEmuPrompt2 where:

ConEmuPrompt2=$_$E[90m$$
changed here   ^
like image 635
code_fodder Avatar asked Aug 23 '16 08:08

code_fodder


People also ask

How do I go back to one level in cmd?

To navigate up one directory level, use "cd .." To navigate to the previous directory (or back), use "cd -"

How do I get a list of commands in Command Prompt?

Type help and press ↵ Enter . A list of all the available commands will be displayed. The listed is sorted alphabetically. The list is usually larger than the Command Prompt window, so you may need to scroll up to find the command you want.

How do you go to next line in Command Prompt without enter?

The Windows command prompt (cmd.exe) allows the ^ (Shift + 6) character to be used to indicate line continuation. It can be used both from the normal command prompt (which will actually prompt the user for more input if used) and within a batch file.

How do you clear the screen in ConEmu?

To clear your screen do one of the following: Issue clear or cls in your shell. Press Ctrl+L or other hotkey, if your shell supports it. Even cmd+clink may do that.


1 Answers

  1. Make a copy of ConEmu\CmdInit.cmd file.
  2. Replace I the copied file $_ with $S, save changes )
  3. Utilize your modified file in the task {Shells::cmd}.
  4. Save ConEmu settings.
like image 75
Maximus Avatar answered Oct 11 '22 22:10

Maximus