Page 2 of 3

Re: Harmonizing the bash startup scripts

Posted: 23. Sep 2010, 10:13
by damNageHack
thenktor wrote:EDIT2: SuSE uses a red root prompt. Done by this:
:oops: :evil:

Re: Harmonizing the bash startup scripts

Posted: 23. Sep 2010, 15:33
by lmello
But as long as PS1 has \W instead of \w it's OK to me - I hate when the #!$@% prompt gets so big it fills the whole line.

Re: Harmonizing the bash startup scripts

Posted: 24. Sep 2010, 18:48
by thenktor
Yep, because you can always use 'pwd' to see where you actually are.

Re: Harmonizing the bash startup scripts

Posted: 27. Sep 2010, 02:11
by EricC
thenktor wrote:
...

EDIT2: SuSE uses a red root prompt. Done by this:

Code: Select all

        # Colored root prompt (see bugzilla #144620)
        if test "$UID" -eq 0 -a -t ; then
            _bred="$(path tput bold 2> /dev/null; path tput setaf 1 2> /dev/null)"
            _sgr0="$(path tput sgr0 2> /dev/null)"
            PS1="\[$_bred\]$PS1\[$_sgr0\]"
            unset _bred _sgr0
        fi

Interesting approach to a red colored root prompt. I have taken the PCLinuxOS approach for my root prompt.

Code: Select all

export PS1='\[\033[01;31m\]\u[\W]\$\[\033[00m\] '

Re: Harmonizing the bash startup scripts

Posted: 30. Sep 2010, 09:02
by bioterror
Giving my ZSH prompt.

Code: Select all

PS1="$(print '%{\e[1;30m%}-%{\e[0m%}')$(print '%{\e[0;31m%}-%{\e[0m%}')$(print '%{\e[1;31m%}(%{\e[0m%}')$(print '%{\e[0;31m%}%n%{\e[0m%}')$(print '%{\e[1;30m%}@%{\e[0m%}')$(print '%{\e[0;31m%}%m%{\e[0m%}')$(print '%{\e[1;31m%})%{\e[0m%}')$(print '%{\e[;31m%}-%{\e[0m%}')$(print '%{\e[1;31m%}(%{\e[0m%}')$(print '%{\e[0;31m%}%!%{\e[0m%}')$(print '%{\e[1;30m%}/%{\e[0m%}')$(print '%{\e[0;31m%}%l%{\e[0m%}')$(print '%{\e[1;31m%})%{\e[0m%}')$(print '%{\e[0;31m%}-%{\e[0m%}')$(print '%{\e[1;31m%}(%{\e[0m%}')$(print '%{\e[0;31m%}%T%{\e[0m%}')$(print '%{\e[1;30m%}:%{\e[0m%}')$(print '%{\e[0;31m%}%D{%d/%m/%y}%{\e[0m%}')$(print '%{\e[1;31m%})%{\e[0m%}')$(print '%{\e[0;31m%}-%{\e[0m%}')$(print '%{\e[1;30m%}-%{\e[0m%}')
$(print '%{\e[1;30m%}-%{\e[0m%}')$(print '%{\e[0;31m%}-%{\e[0m%}')$(print '%{\e[1;31m%}(%{\e[0m%}')$(print '%{\e[0;31m%}%#%{\e[0m%}')$(print '%{\e[1;30m%}:%{\e[0m%}')$(print '%{\e[0;31m%}%~%{\e[0m%}')$(print '%{\e[1;31m%})%{\e[0m%}')$(print '%{\e[0;31m%}-%{\e[0m%}')$(print '%{\e[1;30m%}-%{\e[0m%}') "
And here's another one I use, ZSH too.

Code: Select all

PS1="$(print '%{\e[0;36m%}%n%{\e[0m%}')$(print '%{\e[1;36m%}')@$(print '%{\e[0;36m%}%m%{\e[0m%}'):$(print '%{\e[1;36m%}%~%{\e[0m%}')%# "


RPS1="$(print '%{\e[0;36m%}.%{\e[1;36m%}:%{\e[0;36m%}%*') on $(print '%{\e[0;36m%}%D%{\e[0m%}%{\e[1;36m%}:%{\e[0;36m%}.%{\e[0m%}')"
Archbang has kinda 1337 bash startup :ugeek:
Image

Re: Harmonizing the bash startup scripts

Posted: 2. Oct 2010, 16:56
by fredg
I would say that startup script have to be minimals and then set by the user himself but yours (lmello) are just not so intrusive, they are just the less they're should be.
I vote yes.

++

Re: Harmonizing the bash startup scripts

Posted: 4. Oct 2010, 05:34
by Akuna
fredg wrote:I would say that startup script have to be minimals and then set by the user himself but yours (lmello) are just not so intrusive, they are just the less they're should be.
I vote yes.

++
+1 ;)

Re: Harmonizing the bash startup scripts

Posted: 27. Mar 2011, 10:43
by gapan
I really don't agree with most of what Imello proposed in his 1st post. man pages should not default to US locale no matter what, I certainly don't want rm/mv/cp to ask me for every file I'm about to delete/move/copy, grep should not be colorized by default as it might break stuff that are piped the grep output and I don't get why we should have ~/.bash_login and ~/.bash_logout files that only point to non existing files in /usr/local/bin.

Re: Harmonizing the bash startup scripts

Posted: 27. Mar 2011, 11:48
by thenktor
gapan wrote:I certainly don't want rm/mv/cp to ask me for every file I'm about to delete/move/copy
Yes, that really sucks :ugeek: But I'm using verbose output for these commands now.

Re: Harmonizing the bash startup scripts

Posted: 5. May 2011, 00:52
by lmello
thenktor wrote:
gapan wrote:I certainly don't want rm/mv/cp to ask me for every file I'm about to delete/move/copy
Yes, that really sucks :ugeek: But I'm using verbose output for these commands now.
That's what the -f option is for.