Harmonizing the bash startup scripts

If you have any suggestions or ideas about improving Salix, here's the place to post them.

Re: Harmonizing the bash startup scripts

Postby damNageHack » 23. Sep 2010, 10:13

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

:oops: :evil:
User avatar
damNageHack
 
Posts: 663
Joined: 24. Sep 2009, 17:07

Re: Harmonizing the bash startup scripts

Postby lmello » 23. Sep 2010, 15:33

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.
User avatar
lmello
 
Posts: 218
Joined: 4. Aug 2010, 17:38
Location: Brazil

Re: Harmonizing the bash startup scripts

Postby thenktor » 24. Sep 2010, 18:48

Yep, because you can always use 'pwd' to see where you actually are.
Image
burnCDDA (burns audio CDs)
last.fm (my last.fm profile)
User avatar
thenktor
Salix Wizard
 
Posts: 2393
Joined: 6. Jun 2009, 14:47
Location: Franconia

Re: Harmonizing the bash startup scripts

Postby EricC » 27. Sep 2010, 02:11

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\] '
Image
User avatar
EricC
 
Posts: 54
Joined: 24. Sep 2009, 02:11
Location: Under an overpass in a shipping crate

Re: Harmonizing the bash startup scripts

Postby bioterror » 30. Sep 2010, 09:02

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
User avatar
bioterror
 
Posts: 20
Joined: 19. Sep 2010, 13:11
Location: Espoo, Finland

Re: Harmonizing the bash startup scripts

Postby fredg » 2. Oct 2010, 16:56

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.

++
User avatar
fredg
Salix Warrior
 
Posts: 231
Joined: 3. Oct 2009, 16:50
Location: Lyon, France

Re: Harmonizing the bash startup scripts

Postby Akuna » 4. Oct 2010, 05:34

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 ;)
Image
What really matters is where you are going, not where you come from.
User avatar
Akuna
Salix Wizard
 
Posts: 1041
Joined: 14. Jun 2009, 12:25

Re: Harmonizing the bash startup scripts

Postby gapan » 27. Mar 2011, 10:43

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.
Image
User avatar
gapan
Salix Wizard
 
Posts: 3487
Joined: 6. Jun 2009, 17:40

Re: Harmonizing the bash startup scripts

Postby thenktor » 27. Mar 2011, 11:48

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.
Image
burnCDDA (burns audio CDs)
last.fm (my last.fm profile)
User avatar
thenktor
Salix Wizard
 
Posts: 2393
Joined: 6. Jun 2009, 14:47
Location: Franconia

Re: Harmonizing the bash startup scripts

Postby lmello » 5. May 2011, 00:52

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.
User avatar
lmello
 
Posts: 218
Joined: 4. Aug 2010, 17:38
Location: Brazil

PreviousNext

Return to Suggestions