Skip to main content
edited tags
Link
Gilles 'SO- stop being evil'
  • 865.9k
  • 205
  • 1.8k
  • 2.3k
edited tags
Link
Braiam
  • 36.9k
  • 29
  • 114
  • 176
deleted 75 characters in body
Source Link
Michael Durrant
  • 43.7k
  • 73
  • 176
  • 238

I recently updated my Ubuntu 14.04 using the software update.

This caused some problems. Initially I couldn't open up a new terminal window due to unknown errors with my .bashrc I had to use another shell to remove my .bashrc file to fix it. While slowly adding back the .bashrc file I now have a problem with my PS1 prompt settings.

For a while I've used

git_branch () { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'; } HOST='\033[02;36m\]\h'; HOST=' '$HOST TIME='\033[01;31m\]\t \033[01;32m\]' LOCATION=' \033[01;34m\]`pwd | sed "s#\(/[^/]\{1,\}/[^/]\{1,\}/[^/]\{1,\}/\).*\(/[^/]\{1,\}/[^/]\{1,\}\)/\{0,1\}#\1_\2#g"`' BRANCH=' \033[00;33m\]$(git_branch)\[\033[00m\]\n\$ ' PS1=$TIME$USER$HOST$LOCATION$BRANCH PS2='\[\033[01;36m\]>' 

in my .bashrc to show time, user, host, pwd and git branch (in various colors) within my prompt.

After the upgrade I have a strange character at the start of each of those that didn't used to be there. Some sort of small outlined box with 4 tiny numbers in it !

enter image description hereenter image description here

What is causing this & how to fix it?

I recently updated my Ubuntu 14.04 using the software update.

This caused some problems. Initially I couldn't open up a new terminal window due to unknown errors with my .bashrc I had to use another shell to remove my .bashrc file to fix it. While slowly adding back the .bashrc file I now have a problem with my PS1 prompt settings.

For a while I've used

git_branch () { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'; } HOST='\033[02;36m\]\h'; HOST=' '$HOST TIME='\033[01;31m\]\t \033[01;32m\]' LOCATION=' \033[01;34m\]`pwd | sed "s#\(/[^/]\{1,\}/[^/]\{1,\}/[^/]\{1,\}/\).*\(/[^/]\{1,\}/[^/]\{1,\}\)/\{0,1\}#\1_\2#g"`' BRANCH=' \033[00;33m\]$(git_branch)\[\033[00m\]\n\$ ' PS1=$TIME$USER$HOST$LOCATION$BRANCH PS2='\[\033[01;36m\]>' 

in my .bashrc to show time, user, host, pwd and git branch (in various colors) within my prompt.

After the upgrade I have a strange character at the start of each of those that didn't used to be there. Some sort of small outlined box with 4 tiny numbers in it !

enter image description here

What is causing this & how to fix it?

I recently updated my Ubuntu 14.04 using the software update.

This caused some problems. Initially I couldn't open up a new terminal window due to unknown errors with my .bashrc I had to use another shell to remove my .bashrc file to fix it. While slowly adding back the .bashrc file I now have a problem with my PS1 prompt settings.

For a while I've used

git_branch () { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'; } HOST='\033[02;36m\]\h'; HOST=' '$HOST TIME='\033[01;31m\]\t \033[01;32m\]' LOCATION=' \033[01;34m\]`pwd | sed "s#\(/[^/]\{1,\}/[^/]\{1,\}/[^/]\{1,\}/\).*\(/[^/]\{1,\}/[^/]\{1,\}\)/\{0,1\}#\1_\2#g"`' BRANCH=' \033[00;33m\]$(git_branch)\[\033[00m\]\n\$ ' PS1=$TIME$USER$HOST$LOCATION$BRANCH PS2='\[\033[01;36m\]>' 

in my .bashrc to show time, user, host, pwd and git branch (in various colors) within my prompt.

After the upgrade I have a strange character at the start of each of those that didn't used to be there. Some sort of small outlined box with 4 tiny numbers in it !

enter image description here

What is causing this & how to fix it?

Source Link
Michael Durrant
  • 43.7k
  • 73
  • 176
  • 238
Loading