I change shell's foreground color with
echo -ne '\e[1;31m' command but when I execute
ls command the foreground color reverts back to the original previous color. This weird behavior doesn't occur when other commands are executed. I am clueless about the cause behind this.
Please write an explanation for this and also suggest the remedy. thanks
I am using UBUNTU 14.10.
EDIT- I have tried to remove the escape sequence for white color foreground by setting the alias for
alias ls='ls --color=auto |sed -r 's/\x1b[37m]//''
But, this has a problem too, the
ls outputs all the directory names and filenames with single color ,i.e not with the default colors for all items.This is strange as I have removed just the
[37m which is the white foreground but it removes all the colors.