Ticket #3399 (new defect)

Opened 14 months ago

Last modified 11 months ago

sugar-jhbuild shell should change the prompt

Reported by: manuq Owned by: sascha_silbe
Priority: Unspecified by Maintainer Milestone: Unspecified by Release Team
Component: sugar-jhbuild Version: Unspecified
Severity: Unspecified Keywords:
Cc: Distribution/OS: Unspecified
Bug Status: Unconfirmed

Description

This will prevent confusions while working inside a Sugar shell. The PS1 variable should change to identify it.

Proposal: prefixing PS1 with '(sugar)', like:

[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.

Attachments

0001-PS1-variable-for-shell-command.patch Download (0.9 KB) - added by humitos 14 months ago.

Change History

Changed 14 months ago by humitos

I was taking a look at this, and it's no trivial because that variable is set by ~/.bashrc or /etc/bash.bashrc. So, if we set this variable in the sugar config script; it will be override when that script was called (after os.execlp call).

Changed 14 months ago by humitos

Changed 14 months ago by humitos

The patch attached only works if the user doesn't have set the PS1 variable but that is not so common.

That patch shows where we should set the PS1 environment variable, at least :)

Changed 11 months ago by manuq

  • component changed from sugar-datastore to sugar-jhbuild
Note: See TracTickets for help on using tickets.