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

how to get a two-line PS1 #4

Open
lituan opened this issue Nov 27, 2017 · 1 comment
Open

how to get a two-line PS1 #4

lituan opened this issue Nov 27, 2017 · 1 comment

Comments

@lituan
Copy link

lituan commented Nov 27, 2017

I'd like to show PS1 prompt in one line, and put my command in second line, so that I can see all the infomation and do not have to type command into two lines, how could I get this feature?

@RuhtraX
Copy link

RuhtraX commented Apr 5, 2019

You can use "\n" to break a line in your PS1 variable.
For example setting your PS1 variable like this in your .bashrc:
PS1='\u@\h:\w\n\$ '
will give you something like this:

username@hostname:/working/directory
$ (your commands go here)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants