I would like to be able to say things like
cd [.fred] and have my default directory go there, and my prompt change to indicate the full path to my current location.
I would like to be able to say things like
cd [.fred] and have my default directory go there, and my prompt change to indicate the full path to my current location.
Use HGSD which implements an SD (short for SET DEFAULT) command. Just google it. It is an improved version by Hunter Goatley of an older implementation.
The only thing it cannot handle (yet), are logicals with multiple translations. Other than that, It works like a charm, and you do not need to type in complete directory names. You can even move to the next directory on the same level.
It can also set the prompt if you have the right privileges in one go, so your prompt will reflect your default directory, just like in the old days on DOS.
Just type
cd:==set default
at the command prompt. You can also put this in your LOGIN.COM file, but be sure to put a $ in front, i.e.
$ cd:==set default
To change your prompt to show your default, something like this may work up to a point
$ set prompt='f$env("default")'
There is a problem though with the fact that VMS prompt has maximum 32 characters, and your default might be longer than that. Have a look at this page for a way around that problem.
Here's my setup:
You need 2 files (typed below) : godir.com and prompt.com in your sys$login
You may define a symbole
But I suggest you to use something else... (ie SD == "@sys$login:godir.com")
I modify the help text. It was in french...
You will have to retype the escape caracters into godir.com Replace ESC by the real escape into GRAPH_BOUCLE: (see bottom of godir.com)
Then to use it:
Hope it helps.
Here's prompt.com
Here's godir.com
My DCL is really rusty, but can't you create an alias for SET DEFAULT named CD?