On Wed, 2003-07-23 at 07:36, David Z Maze wrote:
Depending on how complicated the script is, rewriting it as a shell
function might be appropriate. You could add to your .bashrc file
something like
cdls() { cd "$1"; ls; }
and then "cdls foo" would change directories to foo and list it.
If your script is really complicated, alter it a bit so it prints out
the directory to change to and you can still do it as a function:
mycd() {
cd `my-big-script "$*"`
}
my-big-script:
#! /bin/sh
# Do lots of stuff
echo /the/new/directory