>> >>I am continually adding alias commands to my default profile file.
>> >>Oftentimes I am in a bash instance that has not sourced the profile file
>> >>since the particular alias that I am trying to run has been added.
>> >>Now, is it possible to hack the bash - perhaps the source to instruct it
>> >>that whenever it cannot find a command it must `. profilefile', then try
>> >>the command again?
>> As expected, several of the posters have misunderstood what you meant.
>> You are looking for something like in TCL and, I think, Lisp, where
>> the system (i.e., interpreter) will automatically try to look up
>> unknown procedures for you, at runtime, on an as-needed basis.
>> As far as I know, no shells do this.
>> To answer your question, sure, I'm sure you could hack bash to add
>> this feature. You will probably have to figure out on your own how to
>> do it though - I doubt anyone on the newsgroup is going to want to do
>> it for you.
>No need hack the bash... :)
>For bash (exclusively):
>Put your alias commands in $HOME/.bashrc
>.bashrc will be starting every time when new copy of bash start
>and aliases will be stilling workable.
No, you still don't get it.
The idea is that you've got shells laying around (say, a bunch of open
xterms) and you edit your aliases file (.bashrc or whatever). You
want everythng to be automatically updated, *without* having to do any
of the following:
1) Logout and log back in
2) Close and re-open each of the shells
3) Type a command to "re-source" the .bashrc or whatever file
(in each shell)
The idea is that it should be "perfect save" - that is, the moment the
change is made in the master file, the properties of all open
objects (instances) should be immediately and automatically updated.
Its tough to do within the basic paradigm of Unix. But it is a neat
Note that something like the "unknown_command" hook in TCL would
handle the case of a newly defined alias, but wouldn't handle
redefinition of an existing alias.