3 ms·
Customizing Your Bash Prompt
- planckscnst 13y agoIf you're interested in oh-my-zsh-style themes and plugins for bash, checkout bashit. https://github.com/revans/bash-it https://github.com/revans/bash-it
- joeblau 13y agoI've gone with Powerline, here is a sample[1]. I like it because it shows me what branch I'm on when I'm inside a git repo and whether or not I need to commit. The theme I'm using is Tomorrow Night Bright[2]. [1] - http://i.imgur.com/86B9B5N.png http://i.imgur.com/86B9B5N.png [2] - https://github.com/chriskempson/tomorrow-theme https://github.com/chriskempson/tomorrow-theme
- gpmcadam 13y agoI could never get those beautiful powerline fonts working with Profont on Xterm/Urxvt. I see you're using OSX, so it may not be helpful, but what font are you using there?
- joeblau 13y agoMenlo Regular for Powerline. Yeah Powerline setup is not very clean, but once it's up and running, it looks great. You have to compile the fonts with he special Powerline symbols order to get it to work properly. Here are some fonts that are already pre-complied[1]. [1] - https://github.com/Lokaltog/powerline-fonts https://github.com/Lokaltog/powerline-fonts
- dcope 13y agoWow, that's quite busy. Have you checked out `tmux-powerline`? I know it's deprecated but it still works very well. Here's a screenshot of my setup for reference: http://cl.ly/image/3m2k1p1T2S2Y http://cl.ly/image/3m2k1p1T2S2Y
- joeblau 13y agoI haven't checked that out, but I definitely will. What happens when you go into a directory that's very deep in the tree?
- dcope 13y agoThe working directory will be truncated with ellipses a specified length. The default is 40 but it, of course, can be changed. :) https://github.com/erikw/tmux-powerline/blob/master/segments/pwd.sh#L7 https://github.com/erikw/tmux-powerline/blob/master/segments...
- D9u 13y agoThere are all sorts of easy to use online prompt generators. http://xta.github.io/HalloweenBash/ http://xta.github.io/HalloweenBash/ https://ddg.gg/?q=bash+prompt+generator https://ddg.gg/?q=bash+prompt+generator But it's not so difficult to customize your prompt yourself. Read the man page for whichever shell you're using. I don't care for any of that oh-my-zsh, or powerline stuff, etc. Back in the early 1990's, when I did most of my work in MS-DOS, I used ANSI.SYS and escape sequences to add colors, info, and positioning, and the same basics still apply in most of today's Unix-like systems.