Jonathan Herriott wrote:
What I am trying to do is execute the command in the calling shell.
So, if I were to execute my program, which changes the directory, it
Write a shell script. If using sh/bash? run it as ". shellscript" or if
csh "source shellscript". You can then make aliases (at least in csh)
would do the following:
That's basically what I'm looking for. Being able to modify the
calling shell with a program.
alias foo "source shellscript"
Then when you type "foo", any cd inside the shellscript will affect your
% cat foo.sh
% alias foo "source foo.sh"
This is a rubbish alias since it only works if you are in the same
directory as the shellscript, but I'm sure you can do better :-)
To my mind you are still explaining the solution you have come up with
for some problem, but have not actually explained the original problem.
Your "solution" is generally impossible since one process (your C
program) cannot arbitrarily affect the running environment (the current
directory) of another process (your shell).
firstname.lastname@example.org mailing list
To unsubscribe, send any mail to "[EMAIL PROTECTED]"