From 2ed6d7793226220a23804b216a10063f44391217 Mon Sep 17 00:00:00 2001 From: Mart Lubbers Date: Tue, 2 Dec 2014 08:32:42 +0100 Subject: [PATCH] ps1 customize --- .bashrc | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.bashrc b/.bashrc index c7c30d0..28063f1 100644 --- a/.bashrc +++ b/.bashrc @@ -16,3 +16,12 @@ alias ls='ls --color=auto' alias grep='grep --color=auto' [ ! -s ~/.config/mpd/pid ] && mpd + +source /usr/share/git/completion/git-prompt.sh +set_prompt(){ + last_c=$? + PS1='\u@\h' + [[ $last_c -ge 1 ]] && PS1="($last_c) $PS1" + PS1="$PS1\w$(__git_ps1)\$ " +} +PROMPT_COMMAND='set_prompt' -- 2.20.1