0

I put in place color codes on our Centos7 servers with a file in /etc/profile.d/file.sh :

export PS1="\e[1;36m[\u@\h \W]\$ \e[m "

Thing is, now, when I go through my CLI history after typing in a command as root, it will not replace all of the command, which makes it hard to read.

Example : I would type

sudo yum install php php-cli

Then type something else. Then if i want to go back in the history using the up arrow on my keyboard, I will end up having things like :

sudo yum ils-l
sudo yum ips aux |grep total
sudo yum icat /var/log/httpd

Instead of

ls -l
ps aux | grep total
cat /var/log/httpd

I assume the two are linked, but I can't manage to understand what I'm missing.

1 Answers1

0

<%= @color %> is not a valid syntax for a color mode number; replace that by a number from 30 to 37; see List of ANSI color escape sequences.

Community
  • 1
  • 1
Armali
  • 18,255
  • 14
  • 57
  • 171