From becd9b76d4a2e06869195e6154bd8f6f7efeef7d Mon Sep 17 00:00:00 2001
From: Adar Nimrod <nimrod@shore.co.il>
Date: Mon, 27 Nov 2017 23:29:28 +0200
Subject: [PATCH] Export PS0 and PS1 when the shell is Bash, otherwise the
 prompt in sh is broken.

---
 .bashrc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.bashrc b/.bashrc
index 47b6dd5..f780a29 100644
--- a/.bashrc
+++ b/.bashrc
@@ -7,8 +7,6 @@ export HISTFILE="$HOME/.history"
 export HISTCONTROL=ignoreboth:erasedups
 export HISTSIZE=100000
 export HISTFILESIZE=100000
-export PS0="\$(__prerun)"
-export PS1="\$(__prompt)\u@\h:\w\$ "
 export REPREPRO_BASE_DIR="$HOME/Documents/Shore/debian-repository"
 export EDITOR=vim
 export GOPATH="$HOME/Documents/Golang"
@@ -181,6 +179,8 @@ then
     shopt -s histappend
     shopt -s checkwinsize
     shopt -s cmdhist
+    export PS0="\$(__prerun)"
+    export PS1="\$(__prompt)\u@\h:\w\$ "
     export PROMPT_COMMAND="history -a"
     [ -f /etc/bash_completion ] && . /etc/bash_completion
 
-- 
GitLab