[Sugar-devel] Changing the prompt when inside a Sugar shell

Manuel Kaufmann humitos at gmail.com
Sun Mar 25 21:43:31 EDT 2012


2012/3/25 Manuel Quiñones <manuq at laptop.org>:
> Is a bit confusing for me to know which tabs in my GNOME Terminal are
> inside Sugar shells.  I often end calling env and checking for the
> current environment variables.

Yes, I agree with you.

We should change the value of the PS1 variable as virtualenv does:
prefixing it with the name of the virtualenv between parenthesis.

Something like this would be nice:

[humitos] [~/sugar]$ PS1=(sugar)$PS1
(sugar)[humitos] [~/sugar]$

Besides, we should save the old PS1 to be able to restore it when the
user closes the "sugar" session.

-- 
Kaufmann Manuel
Blog: http://humitos.wordpress.com/
Porfolio: http://fotos.mkaufmann.com.ar/
PyAr: http://www.python.com.ar/


More information about the Sugar-devel mailing list