LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   .bashrc .bash_profile (https://www.linuxquestions.org/questions/slackware-14/bashrc-bash_profile-319608/)

Soulful93 05-03-2005 02:11 AM

.bashrc .bash_profile
 
I was wondering if a kind soul would be willing to post their .bashrc and or your .bash_profile for me. I've already set my default shell to bash, and I'd like to set some aliases up for myself.

I'm not sure on what need's to go into to the above files for them to both function properly. I don't know how to script them. Any help will be apreciated... :)

Artanicus 05-03-2005 02:51 AM

my bash_profile is as follows, because I want my sessions to be consistent.

Code:

if [ -f ~/.bashrc ]; then
    source ~/.bashrc
fi

And well, the cleaned up version of my users bashrc, here goes:
Code:

export VISUAL=/usr/bin/nano
export EDITOR=/usr/bin/nano
# aliases
alias pois='clear && logout'
alias vihreš='printf "\e[32m\n"'
alias punainen='printf "\e[31m\n"'
alias musta='printf "\e[30m\n"'
alias sininen='printf "\e[34m\n"'
alias xine-dvd='xine --auto-play --auto-scan dvd'
alias perl-module-install-MCPAN='perl -MCPAN -e shell'
alias bbslash='bbslashdot -b firefox -x 875 -y 920'
alias wwwo='cat /var/log/apace2/access_log | tail -n 100 | grep -iv localhost'
alias grassy='fbsetbg -f /share/images/wallpapers/Grassy.jpg'
alias fbwall='fbsetbg -f /share/images/wallpapers/fluxbox.img'
alias asenna='./configure && make && make install'
alias flightsim='ys' # I never remember the bin (;

# bashcomplete
bash=${BASH_VERSION%.*}; bmajor=${bash%.*}; bminor=${bash#*.}
if [ "$PS1" ] && [ $bmajor -eq 2 ] && [ $bminor '>' 04 ] \
  && [ -f /etc/bash_completion ]; then # interactive shell
        # Source completion code
        . /etc/bash_completion
elif [ "$PS1" ] && [ $bmajor -eq 3 ] \
  && [ -f /etc/bash_completion ]; then # interactive shell
        # Source completion code
        . /etc/bash_completion
fi
unset bash bmajor bminor

# PS1 moddings
PS1='[\033[01;33m\t\033[m] [\u@\h] \w# '

# allways use dircolors, even if su
eval `dircolors -b /etc/DIR_COLORS`

# if a ssh session, lets screen it
if [ "$SSH_CONNECTION" ]; then
    if [ -z "$STY" ]; then
        # Screen is not currently running, but we are in SSH, so start a session
        exec screen -d -R -S ssh
    fi
fi

# a nifty calendar software, shows me my appintments for the next 3 weeks to come upon login.
clcal -w 3

Thats about it, hoper this gave you some ideas what people do with bashrc.. (;

Soulful93 05-03-2005 02:59 AM

Good lord that's the biggest .bashrc I've ever seen! :) Thank you for the help.

keefaz 05-03-2005 03:00 AM

Also you can create a ~/.bash_logout with :
Code:

clear
This way, the terminal is cleared when you exit

Artanicus 05-03-2005 03:02 AM

Quote:

Originally posted by keefaz
Also you can create a ~/.bash_logout with :
Code:

clear
This way, the terminal is cleared when you exit

thanks for the tip.. why didnt I think of that.. lol.. been using my 'clear && logout' alias for years now.. wont prolly get used to a simple logout anymore.. heh


All times are GMT -5. The time now is 11:56 AM.