As you can see in the screenshot, I have an unneeded newline character in my prompt. Anyone know how to do remove this character from my prompt?

enter image description here

link|improve this question

69% accept rate
Then stop pressing Enter? – Ignacio Vazquez-Abrams Jan 18 at 10:55
-1, this is not a diagram, and this question means nothing. – Ravachol Jan 18 at 11:01
Can you explain a bit more about what you mean? – Paul Jan 18 at 11:01
@Ravachol Please use comments to provide constructive guidance to help the OP provide enough information – Paul Jan 18 at 11:04
1  
The thing is that the questioner knows the answer to the question as it is asked. Xe stated it in this almost identical question that xe asked three hours earlier. – JdeBP Jan 18 at 17:45
show 2 more comments
feedback

1 Answer

up vote 3 down vote accepted

This "new line character" is part of your Bash prompt, kept in the $PS1 variable:

PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[33m\]\w\[\e[0m\] \$ '

Remove it and put the updated PS1 in your ~/.bashrc.

See Customizing bash prompt for further information.

link|improve this answer
That's great!, how do you my PS1 having the \n? – Kit Ho Jan 19 at 1:10
@Kit: I guessed. – grawity Jan 19 at 9:12
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.