Re: extra-prompt.sh

2005-09-19 Thread Bruce Dubbs
Torsten Vollmann wrote: > Hi. > > Two issues with extra-prompt.sh which popped up during my work on the > alfs-profile for blfs-6.1, see: > > http://archives.linuxfromscratch.org/mail-archives/alfs-discuss/2005-September/007000.html > > > First the minor one: If my understandig of extra-prompt

Re: extra-prompt.sh

2005-09-19 Thread Torsten Vollmann
Bruce Dubbs wrote: > No, it *supplements* PS1. As the book says: > "The normal variable, PS1, is supplemented by PROMPT_COMMAND. If set, > the value of PROMPT_COMMAND is executed as a command prior to issuing > each primary prompt." > > It is meant as an example. We expect users to use it or n

Re: extra-prompt.sh

2005-09-23 Thread Torsten Vollmann
Hi. I commentet out the export line in the script but still PROMPT_COMMAND is set and used... Only commenting out the PROMPT_COMMAND line helps Could it be the export isn't needed at all? Sadly I'm not so deep into bash programming but always thought things not exported don't make it beyond the s

Re: extra-prompt.sh

2007-07-28 Thread David Jensen
Moving to dev. Ag. D. Hatzimanikas wrote: > On Fri, Jul 27, at 09:07 Craig Jackson wrote: > >> Hello, >> >> In BLFS-6.2, Chapter 3 - The Bash Startup Files, the >> /etc/profile.d/extra-prompt.sh provides interesting results. I must >> have had this problem a dozen times now, and since it is a

Re: extra-prompt.sh

2007-07-28 Thread Bruce Dubbs
David Jensen wrote: > Moving to dev. > Ag. D. Hatzimanikas wrote: >> Does this prompt (in /etc/profile) looks good to you? (it was suggested by >> David Jensen) >> >> if [[ ${EUID} == 0 ]] ; then >> PS1='\[\e[1;31m\]\u [ \[\e[00m\]\w \[\e[1;31m\]]\$ \[\e[00m\]' >> else >> PS1='

Re: extra-prompt.sh

2007-07-29 Thread taipan67
Bruce Dubbs wrote: > David Jensen wrote: > >> Moving to dev. >> > > >> Ag. D. Hatzimanikas wrote: >> >>> Does this prompt (in /etc/profile) looks good to you? (it was suggested by >>> David Jensen) >>> >>> if [[ ${EUID} == 0 ]] ; then >>> PS1='\[\e[1;31m\]\u [ \[\e[00m\]\w \[\

Re: extra-prompt.sh

2007-07-29 Thread David Jensen
taipan67 wrote: if [[ ${EUID} == 0 ]] ; then PS1='\[\e[1;31m\]\u [ \[\e[00m\]\w \[\e[1;31m\]]\$ \[\e[00m\]' else PS1='\[\e[1;32m\]\u [ \[\e[00m\]\w \[\e[1;32m\]]\$ \[\e[00m\]' fi >> This is too cryptic. Use: >> >> NORMAL="\[\033[0;39

Re: extra-prompt.sh

2007-07-29 Thread Bruce Dubbs
taipan67 wrote: > Bruce Dubbs wrote: >> David Jensen wrote: >> >>> Moving to dev. >>> >> >>> Ag. D. Hatzimanikas wrote: >>> Does this prompt (in /etc/profile) looks good to you? (it was suggested by David Jensen) if [[ ${EUID} == 0 ]] ; then PS1='\[\e[1

Re: extra-prompt.sh

2007-07-29 Thread Bruce Dubbs
David Jensen wrote: > taipan67 wrote: > if [[ ${EUID} == 0 ]] ; then > PS1='\[\e[1;31m\]\u [ \[\e[00m\]\w \[\e[1;31m\]]\$ \[\e[00m\]' > else > PS1='\[\e[1;32m\]\u [ \[\e[00m\]\w \[\e[1;32m\]]\$ \[\e[00m\]' > fi > > >>> This is too cryptic. Us

Re: extra-prompt.sh

2007-07-29 Thread Serge van Thillo
On Sun, 2007-07-29 at 09:58 -0500, Bruce Dubbs wrote: > taipan67 wrote: > > Bruce Dubbs wrote: > >> David Jensen wrote: > >> > >> NORMAL="\[\033[0;39m\]" > >> RED="\[\033[1;31m\]" > >> GREEN="\[\033[1;32m\]" > >> > >> if [[ ${EUID} == 0 ]] ; then > >> PS1="$RED\u [ $NORMAL\w$RED ]\$ $NORMAL" > >

Re: extra-prompt.sh

2007-07-29 Thread David Jensen
Bruce Dubbs wrote: much snipped! >> Reviewing this thread >> http://linuxfromscratch.org/pipermail/blfs-dev/2007-March/016818.html >> it seems PS1 should not be exported, no decision was reached >> > > It should not be exported because it does no good. PS1 is reset for > each invocation. Fr

[Diff] profile.xml. [Was: Re: extra-prompt.sh]

2007-07-29 Thread Ag. D. Hatzimanikas
On Sun, Jul 29, at 01:56 David Jensen wrote: > > I suggest. > 1). > Lose /etc/extra-prompt.sh. > 2). > Lose export for PS1. > 3). > Use: > > NORMAL="\[\e[0m\]" > RED="\[\e[1;31m\]" > GREEN="\[\e[1;32m\]" > if [[ ${EUID} == 0 ]] ; then > PS1="$RED\u [ $NORMAL\w$RED ]# $NORMAL" > else

Re: [Diff] profile.xml. [Was: Re: extra-prompt.sh]

2007-07-29 Thread David Jensen
Ag. D. Hatzimanikas wrote: > > > Thanks a lot David, > > Attached is a diff with your suggestions. > > With this chance, I also updated the X.sh script (/X11R6/X11R7). > I was not aware we were making this change. It works for me, /usr/X11R7 is what I use. We should put it to discussion? Per