fish
fish

Reputation: 441

Recoloring Specific Applications within Linux Terminal

I am currently helping tutor an introductory computer science course in Python. The class is introducing people to programming via the terminal. A common problem I am observing is students are struggling to distinguish the standard $ prompt from the Python >>> prompt.

Out of curiosity, is there a way to recolor specific applications within the terminal by modifying something like $PS1?

I was thinking it might be super helpful if the regular prompt was like white but anything within Python was that dark yellowish color (\e[33m).

Upvotes: 0

Views: 65

Answers (1)

Spice
Spice

Reputation: 352

You can edit this using sys.ps1 and sys.ps2. ps1 changes the >>> prompt, while ps2 changes the continuation ... prompt. You can get (hardly) more information here.

Upvotes: 0

Related Questions