Seal

.bashrc

7 posts in this topic

What changes do you make to your .bashrc file?

I always add a "safe rm" function, because I hate the idea of permanently (and accidentally) deleting something:

rm () {
mv $* "$HOME/recycle/";
echo "Deleted file(s) '$*' to Recycle Bin."
}

Edited by Seal
0

Share this post


Link to post
Share on other sites

I source my main /etc/bashrc, and export the UT99 path.

0

Share this post


Link to post
Share on other sites

Just the PS1 and sometimes CLI colors as FreeBSD has no color coding by default, and I like the colors! The odd alias too.

0

Share this post


Link to post
Share on other sites

I skipped the whole .bashrc thing by adding this to it


for PROFILE_SCRIPT in $( ls /etc/bashrc.dir/*.bash ); do
 . $PROFILE_SCRIPT

Then I create a bunch of files each holding a single alias or script. Easier to manage.

Only thing is I cant use the aliases in sudo or su mode. :(

0

Share this post


Link to post
Share on other sites

My .bashrc is fairly well crafted, I usually add custom command completion and change my PS1 like this:


PS1='-{$?}- [\u@\h] \w \$ '

Sometimes if I feel like wasting an hour I'll configure my PS1 to update my Xterm title bar, and add colors and what not.

--ed

0

Share this post


Link to post
Share on other sites

i usaly just have a few aliases, cause i like single letter command things.

Just the PS1 and sometimes CLI colors as FreeBSD has no color coding by default, and I like the colors! The odd alias too.

install the gnuls package, wich will give you the same ls command and linux distros use. bsd's ls supports colors, you just cant change them.

0

Share this post


Link to post
Share on other sites

i use afew aliases, i like this one

alias today='grep -h -d skip `date +%m/%d` /usr/share/calendar/*'

the output of today in terminal today is this

$ today
04/22   Kant born, 1724
04/22   Joerg Wunsch <joerg@FreeBSD.org> born in Dresden, Sachsen, Germany, 1962
04/22   Jun Kuriyama <kuriyama@FreeBSD.org> born in Matsue, Shimane, Japan, 1973
* $FreeBSD: src/usr.bin/calendar/calendars/calendar.history,v 1.28 2003/04/22 10:33:43 grog Exp $
04/22   Vladimir Ilich Ulyanov, called Lenin, Russian political leader, born in Simbirsk, 1870
04/22   Arbor Day in Nebraska & Delaware
04/22   Oklahoma Day in Oklahoma
04/22*  Hol ha-Mo'ed
04/22*  Omer 5th day

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now