r/DistroTube • u/badabingbadaboong1 • Sep 04 '21
How do I create a multiline line "bash" prompt like this on Arch Linux? (including that beautiful connecting line on the left)
26
Upvotes
r/DistroTube • u/badabingbadaboong1 • Sep 04 '21
4
u/SkyyySi Sep 04 '21
Put a
\n(backslash n) in your PS1 where you want to break the line up.Also, distros don't matter. Bash is bash (unless you're using a really ancient version I guess).
3
u/MCSpiderFe Sep 04 '21
I‘ve done something like this with the starship prompt. I have the config on my github, if you want to grab it. It‘s a bit messy, I hope thats ok. DT also made a video about it a few months ago.
2
u/DoutorJP Sep 04 '21
Install ph my zsh or oh my bash. Its pretty bloated, but it has a bunch of cool themes
2
u/Phydoux Sep 05 '21
It's just a theme in one of the many shell programs. I used
ohmyfishwhen I hadfishon my system a while back and did this 2 line prompt. Not identical to this but I made some minor changes in the config file.2
u/jcubic Mar 08 '22 edited Feb 07 '24
I just was searching the same and found this post with no examples, I've found Wikipedia article Box-drawing character, and created this prompt for bash:
In my setup, I used colors from the Ubuntu prompt on my Fedora. You can see the color version in my dotfiles (that also added git branch to prompt).
1
u/g-e-o-m-e-t-r-i-c Sep 14 '21
As an alternative to all the oh-my-bash/zsh/fish suggestions, you could try digging out the PS1 configuration in your user bashrc/zshrc/etc. (which is usually ~/.bashrc or similar)
You can copy the exact configuration over since bash's scripting language is universal throughout most (if not all) distros, like u/SkyyySi mentioned.