title: PS1 prompt differences between bash versions 3.2.25 v 4.1.2
body: <p>I have a preferred bash prompt layout and have tried to apply it to 2 different systems at work. However, it does not perform the same in both environments.</p>
  
  <p>As listed in the question, one is running 3.2.25 and the other 4.1.2.
  You may have guessed that it works correctly on the machine with the higher version of bash.</p>
  
  <p>My problem is I cannot see what I have introduced that would not be understood by both versions.</p>
  
  <p>Relevant lines from .bashrc follow:</p>
  
  <pre><code># Colours
  RED='\[\e[1;31m\]'
  GREEN='\[\e[1;32m\]'
  YELLOW='\[\e[1;33m\]'
  BLUE='\[\e[1;34m\]'
  CYAN='\[\e[1;36m\]'
  NORM='\[\e[m\]'
  
  # PS1 pieces
  DATE='[\D{%d-%m-%Y} \t]'
  LPATH='[\w]'
  DB_USER='[genomst]'
  DB_COL=BLUE
  WHERE='[\u@\h]'
  
  PS1="$YELLOW$DATE$GREEN$LPATH$NORM\n${!DB_COL}$DB_USER$NORM$WHERE\$ "
  </code></pre>
  
  <p>The unusual behaviour I am getting occurs when I try to search for a previous command I have used, pressing ctrl+r to search.</p>
  
  <p>On the 4.1.2 version of course everything behaves, but on the 3.2.25 version the prompt that returns shows my cursor flashing in the middle:</p>
  
  <p>Steps to repeat are:</p>
  
  <pre><code>1. login as user and receive the following prompt:
  [28-09-2017 17:36:20][~]
  [genomst][oracle@pwdchora51]$ 
  2. Press ctrl+r and search for vim
  [28-09-2017 17:36:20][~]
  (reverse-i-search)`vim': vim .bashrc
  3. Press left arrow key (could be any but this shows just how far I have moved back)
  [28-09-2017 17:36:20][~]
  [genomst][oracle@pwdchora51]$ vim .bashrc
                      ^
  </code></pre>
  
  <p>^ indicates where cursor is on my screen</p>
  
  <p>Any light that someone could shed on this issue would be much appreciated ￼</p>
  
  <p>Please let me know if any further detail is required??</p>