Re: bash: can I cd from a script

2003-07-24 Thread David selby
Dave Carrigan wrote: 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

Re: bash: can I cd from a script

2003-07-23 Thread Dave Carrigan
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 l

Re: bash: can I cd from a script

2003-07-23 Thread David Z Maze
Colin Watson <[EMAIL PROTECTED]> writes: > On Wed, Jul 23, 2003 at 11:17:58AM +0100, David selby wrote: >> I have a script to show a certain directory, it would be great if that >> script could change my pwd to that directory. >> >> Inside my script is a cd /usr/lo., however since the script

Re: bash: can I cd from a script

2003-07-23 Thread Colin Watson
On Wed, Jul 23, 2003 at 11:17:58AM +0100, David selby wrote: > I have a script to show a certain directory, it would be great if that > script could change my pwd to that directory. > > Inside my script is a cd /usr/lo., however since the script > automaticly runs in a subshell, when it ends

bash: can I cd from a script

2003-07-23 Thread David selby
I have a script to show a certain directory, it would be great if that script could change my pwd to that directory. Inside my script is a cd /usr/lo., however since the script automaticly runs in a subshell, when it ends my directory has not changes. I have tries export PWD=/usr/lo no