I use the terminal and want to use a specific colour when writing commands.
For instance, suppose I write "history" on the command-line. I would like that the commands entered from the keyboard are colourised with a predefined colour.
In summary, all the commands entered by the user will show with the same colour.
Thus
history
grep -hir -C 8 "hello world" .
will show in blue.
Currently I have the following for PS1
PS1='\n\[\033[01;36m\]\u@\h:'
PS1=$PS1'\n+ \[\033[38;5;214m\]\w\[\033[00m\]\n'
Then I did the following
OPS0="$PS0" OPS1="$PS1"
t7="$(tput setaf 7)" t5="$(tput setaf 5)"
[[ -n "$PS1" ]] && PS0="\[$t7\]" PS1="\[$t7\]$PS1\[$t5\]"
I get two strange characters at the beginning, just before 01cuneus
pete@home:~$ ls
01cuneus Admir Documents logs Public
02chaos conjgrad.f90~ Downloads Music temp
03marshl Desktop fontconfig Pictures Videos

echo hello; tput setaf 4; echo world; tput setaf 7