Skip to main content
replaced http://stackoverflow.com/ with https://stackoverflow.com/
Source Link

According to this StackOverflow postthis StackOverflow post, it is possible have a colored prompt in KornShell. I have not been able to figure out how to do this. I am able to use color:

echo -e "\033[34mLinux\033[00m" 

gives a blue "Linux" output, as does:

printf "\033[34mLinux\033[00m" 

However, when I incorporate the escape codes into my PS1 prompt variable, they are not being escaped. What do I need to do to get a colored prompt? Besides being something of a sucker for eyecandy, I find that a colored prompt is useful when visually parsing output.

According to this StackOverflow post, it is possible have a colored prompt in KornShell. I have not been able to figure out how to do this. I am able to use color:

echo -e "\033[34mLinux\033[00m" 

gives a blue "Linux" output, as does:

printf "\033[34mLinux\033[00m" 

However, when I incorporate the escape codes into my PS1 prompt variable, they are not being escaped. What do I need to do to get a colored prompt? Besides being something of a sucker for eyecandy, I find that a colored prompt is useful when visually parsing output.

According to this StackOverflow post, it is possible have a colored prompt in KornShell. I have not been able to figure out how to do this. I am able to use color:

echo -e "\033[34mLinux\033[00m" 

gives a blue "Linux" output, as does:

printf "\033[34mLinux\033[00m" 

However, when I incorporate the escape codes into my PS1 prompt variable, they are not being escaped. What do I need to do to get a colored prompt? Besides being something of a sucker for eyecandy, I find that a colored prompt is useful when visually parsing output.

Source Link
Kazark
  • 989
  • 3
  • 12
  • 32

Colored Prompt in KornShell

According to this StackOverflow post, it is possible have a colored prompt in KornShell. I have not been able to figure out how to do this. I am able to use color:

echo -e "\033[34mLinux\033[00m" 

gives a blue "Linux" output, as does:

printf "\033[34mLinux\033[00m" 

However, when I incorporate the escape codes into my PS1 prompt variable, they are not being escaped. What do I need to do to get a colored prompt? Besides being something of a sucker for eyecandy, I find that a colored prompt is useful when visually parsing output.