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

Friday, July 17, 2020

Add git information to your bash prompt

To show git information in your bash prompt, add the following function in your ~/.bashrc

function git-shell() {
  export GIT_PS1_SHOWDIRTYSTATE=1
  export PS1='\[\033[01;33m\] (git) \[\033[01;34m\]\w$(__git_ps1 " \[\033[01;32m\](%s)")\[\033[00m\]\n\$ '
}

Then, in your bash, run "git-shell" and you will get a nice git prompt:

 (git) /path_to_your_git_project (master *)
$ 

Wednesday, December 18, 2019

Keep the color prompt in tmux

To keep your prompt (PS1) with color shown in tmux screen, add the following property in .bashrc:

force_color_prompt=yes


Learning System Design with Cute Animation

 This one is superb -  https://designed-to-scale.vercel.app/