Showing posts with label prompt. Show all posts
Showing posts with label prompt. Show all posts

Sunday, January 20, 2013

How to show git branch/status information in bash

extension for terminal/command line to use git more effectively:

For Mac users, (zsh): https://github.com/olivierverdier/zsh-git-prompt

For bash(works fine for Ubuntu): https://github.com/magicmonty/bash-git-prompt
I do following update for /home/USER/.bash/gitprompt.sh :
PROMPT_START="$WHITE$Time12a $Yellow$PathShort$ResetColor"
PROMPT_END=" $ "

For simple branch show(works very fast), (link second comment):
Simply add following line it ~/.bashrc
PS1='[\u@\h`__git_ps1` \W]\$ '



Wednesday, December 28, 2011

My favorite bach command prompt PS1

cd ~
nano .profile
add following line at the end
PS1="[\u@\h \W]$ "
export PS1

logout/login

easy to read link for more.