From 5e535df7f98a7f74adc2af6c23c37092725914c4 Mon Sep 17 00:00:00 2001 From: Alexander Blinne Date: Mon, 11 Apr 2016 20:56:27 +0200 Subject: Erste Version --- bash-git-prompt | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bash-git-prompt b/bash-git-prompt index 05a7907..9bce386 100644 --- a/bash-git-prompt +++ b/bash-git-prompt @@ -1,2 +1,12 @@ #!/bin/bash +PS='\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}<\t> \[\033[01;32m\]\u\[\033[00m\]@\[\033[01;33m\]\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]' + +set -o pipefail + +if branch=$(git branch 2>/dev/null | grep '\*' | cut -d' ' -f2) +then + PS1="$PS $branch\$ " +else + PS1="$PS\$ " +fi -- cgit v1.2.3-70-g09d2