From 09e0fd6f1924cc36bf689e76543ecf4a3af51206 Mon Sep 17 00:00:00 2001 From: DeltaLima Date: Tue, 1 Aug 2023 10:33:27 +0200 Subject: [PATCH] =?UTF-8?q?=E2=80=9EPS1.sh=E2=80=9C=20=C3=A4ndern?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- PS1.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/PS1.sh b/PS1.sh index 3d38a48..1491275 100644 --- a/PS1.sh +++ b/PS1.sh @@ -1,3 +1,7 @@ #!/bin/sh -export PS1="\[$(tput sgr0)\]\[\033[38;5;6m\][\e[1m\[\033[01;32m\]\u\[\033[38;5;39m\]@\[\033[01;32m\]$HOSTNAME\[$(tput sgr0)\]\e[1m\[\033[38;5;11m\]:\[$(tput sgr0)\]\e[1m\[\033[38;5;25m\]\w\[$(tput sgr0)\]\[\033[38;5;6m\]]\[$(tput sgr0)\]\[\033[38;5;11m\]🐧 \[$(tput sgr0)\]"export PS1="\[$(tput sgr0)\]\[\033[38;5;6m\][\e[1m\[\033[01;32m\]\u\[\033[38;5;39m\]@\[\033[01;32m\]$HOSTNAME\[$(tput sgr0)\]\e[1m\[\033[38;5;11m\]:\[\033[38;5;25m\]\w\[$(tput sgr0)\]\[\033[38;5;6m\]]\[\033[38;5;11m\]🐧 \[$(tput sgr0)\]" \ No newline at end of file +git_branch() { + git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' +} + +export PS1="\[$(tput sgr0)\]\[\033[38;5;6m\][\e[1m\[\033[01;32m\]\u\[\033[38;5;39m\]@\[\033[01;32m\]$HOSTNAME\[$(tput sgr0)\]\e[1m\[\033[38;5;11m\]:\[$(tput sgr0)\]\e[1m\[\033[38;5;25m\]\w\[$(tput sgr0)\]\[\033[38;5;6m\]]\[$(tput sgr0)\]\[\033[38;5;11m\]🐧 \[$(tput sgr0)\]"export PS1="\[$(tput sgr0)\]\[\033[38;5;6m\][\e[1m\[\033[01;32m\]\u\[\033[38;5;39m\]@\[\033[01;32m\]$HOSTNAME\[$(tput sgr0)\]\e[1m\[\033[38;5;11m\]:\[\033[01;34m\]\w\[$(tput sgr0)\]\[\033[38;5;6m\]]\[\033[38;5;11m\]\$(git_branch)🐧 \[$(tput sgr0)\]" \ No newline at end of file