adding aliases, refreshing .bashrc
This one has probably been asked many times already, but I can't find anything on it...
I like to make things simple for me when I'm working, so I've added quite a few aliases in the bashrc file. Thing is, I can't figure out how to make the aliases and functions usable without having to restart X or sometimes even the computer. This is irritating considering I'm adding stuff into .bashrc almost every day. Is there some way to "refresh" the computer so that the new .bashrc gets loaded into memory? When I used Mandrake 10 it happened automagically, but not in Slackware current, which I'm using now. |
You can just type "bash" at the prompt to reload bashrc
alternatively, you can make an alias file, for example lets call it .aliases, and call it in from your bashrc. This way, you can just type $source /path_to_it/.aliases and it will refresh your aliases. Then, just add your new aliases to this file from now on. Here's some examples... snippet from /etc/bashrc to call file ------------------------------------------------- if [ -f /home/jeff/.aliases ]; then . /home/jeff/.aliases fi ------------------------------------------------- and here's the .aliases file... alias decode='for i in *.mp3; do lame --decode $i `basename $i .mp3`.wav; done' alias pu=pushd alias po=popd alias la='ls -al' well, you obviously know how to set aliases, so you don't need that I guess. Anywho...good luck... |
Thank you :) That solves my problem :)
Btw, isn't Minnesota the state to which most of the swedish imigrants came to last century? :) Just wondering. |
Or rather, it should have solved it.
doing bash doesn't do the trick for me... aterm won't recognize the new aliases. I'll try your second solution though. |
Ya sure, you betcha...oofda :) :) :)
In other words, you are correct... |
:D
Well, every eight year old in sweden knows that one third of this countrys population skipped over the big pool to "the land where chicken grow to the size of cows" a little over a hundred years ago O_o (a THIRD!!!) ^_^ |
Your second solution worked quite well, I must say :) Even made an alias to reload .aliases :D
Now I just have some wrestling with alsa and the gfx card left to do before this box is atleast as usable as my w1nd0ze box ^_^ |
Another option is to just open a new X terminal (close the current one if you wish)...each time a new terminal is opened it sources bashrc
|
dang, why didn't I think of that.... :newbie:
|
All times are GMT -5. The time now is 02:41 PM. |