Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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

share|improve this question
    
Then stop pressing Enter? –  Ignacio Vazquez-Abrams Jan 18 '12 at 10:55
    
-1, this is not a diagram, and this question means nothing. –  Ravachol Jan 18 '12 at 11:01
    
Can you explain a bit more about what you mean? –  Paul Jan 18 '12 at 11:01
    
@Ravachol Please use comments to provide constructive guidance to help the OP provide enough information –  Paul Jan 18 '12 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 '12 at 17:45
show 2 more comments

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.

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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