DEV Community

Discussion on: a barely capable shell user

Collapse
 
kenbellows profile image
Ken Bellows • Edited

Btw, forgot to say this in the above comment: full paths can get pretty long, so what a lot of people (myself included) like to do is add a line break \n right before the $ to drop it onto a new line:

PS1='\u@\h:\w\n\$ '

michael@Michaels-MacBook-Pro:~/code/projects/some-repo-with-a-really-long-name
$ echo "Commands fit here no problem!"

And if you want a little splash of color, there's a bunch of color codes in the link in my last comment, but to start off, I like to make my user@hostname part a different color from my path, maybe light blue for the former and yellow for the latter. And always remember to reset your color to the default with \e[0m at the end, unless you want all the text you type to be colored as well, if that's your thing.

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

your shell

Give that a try and see what you think!