help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Colouring commands on terminal to be green


From: lisa-asket
Subject: Colouring commands on terminal to be green
Date: Sun, 27 Jun 2021 03:50:55 +0200 (CEST)

Have the following setup for colourising username, hostname, and the current 
working

directory.



PS1='\n\[\033[01;36m\]\u@\h:' 
PS1=$PS1'\n+ \[\033[38;5;214m\]\w\[\033[00m\]\n'

But I also want to colourise the cammands I enter on the command line to show
as green.

Reading the documentation for bash led me to the section on variables related
to prompting.

PS0 
The value of this parameter is expanded and displayed by interactive shells 
after
reading  a command and before the command is executed.

PS1 
The  value of this parameter is expanded and used as the primary prompt string. 
I need some assistance on what I actually have to do such that the commands
I enter in the command line are coloured green.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]