Hacker Timesnew | past | comments | ask | show | jobs | submitlogin
Customizing Your Bash Prompt (twistedcode.org)
17 points by gklein on Aug 4, 2013 | hide | past | favorite | 8 comments


There are all sorts of easy to use online prompt generators.

http://xta.github.io/HalloweenBash/

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.


I'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

[2] - https://github.com/chriskempson/tomorrow-theme


Wow, 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


I haven't checked that out, but I definitely will. What happens when you go into a directory that's very deep in the tree?


The 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...


I 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?


Menlo 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


If you're interested in oh-my-zsh-style themes and plugins for bash, checkout bashit.

https://github.com/revans/bash-it




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: