On Wed, 2003-07-23 at 07:36, David Z Maze wrote:It works ... !, I had in desperation defined an alias
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
alias test='source script' which also worked but was very messy, I prefer your idea, and it is now in situ !
Dave
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]