[plug] bash: making cd persist after script has run
Mike Holland
myk at golden.wattle.id.au
Mon Feb 11 12:51:44 WST 2002
On Mon, 11 Feb 2002, Colin Muller wrote:
> I'd like to have a small bash script which I can use to do quick cd's
> to the directories I visit most frequently as I work. So, being a
Colin, there are better ways to achieve that.
I suggest that you look at the CDPATH environment var. - it lets you
list a number of places to look for dirs when cd-ing.
e.g. set CDPATH=".:~:/home/colin/info/tech"
Combined with tab-completion, I think you will be pleased.
I can really recommend reading the bash manual. There are so many useful
things like that to discover. (Actually I read the zsh manual, but bash
seems to have caught up.)
> Or is there some better way I could approach this?
Yup!
--
"For every fatal shooting, there were roughly three non-fatal shootings.
And folks, this is unacceptable in America. It's just unacceptable. And
we're going to do something about it." -- George W. Bush, 14/5/01
More information about the plug
mailing list