Re: DCL Magic?
On Apr 24, 4:43 pm, Johann 'Myrkraverk' Oskarsson
Bob Koehler <koeh...@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> writes:
In article <00A66925.7CDCD...@xxxxxxxxxxxxxxxx>, VAXman-
What happens when a program called SYS$SETDDIR() and then drops out to
DCLwhere the default was set in the program?
The same as when they use "set default" instead of the .COM file.
But then I never did like path names taking up 80% of my command
zsh has some string manipulation/substitutionmagicthat allows one to
truncate a string like path names. That way, you can display only the
last n characters of the path name in your terminal title, or prompt.
I've forgotten the actual syntax, but can probably dig it out from my
Here is the solution I came up with ...
visit this download page and follow instructions to download
and check out _my_ "SD" offering.
Once installed, you can do what you're attempting with:
$ @SDSYM +T=(S) +N +V ! intial LOGIN setup
$ sd; ! turn off prompt string
! & turn on +T top
in your LOGIN.COM. This will attempt to display your default
in your XTERM (or xterm-compatible) banner. If that doesn't
work, use +T=(S:0) to use line 25 of a VT with status line
capability (VT320 or greater??). If that doesn't work, you can
use +T=(S:1) which will punt and write a reverse video line
on the top line of your screen and define the rest as a scrolling
region. [ Note: the first option S (no option) works great with
PuTTy or xterm/rxvt while S:0 (25th line status) works great on
later model VT's. I don't really use S:1 but it will mostly do
the job if the other options don't cut it.
The line shows up in reverse video and is formatted similar to:
If all those options don't appeal, use
to enable tailoring of your prompt string to match the default.
With tailoring the prompt, you are limited to 32 chars so there
are many options for 'shortening' it and still keeping it meaningful.
For instance, I use:
$ sd, +n="VAX" - ! Cut the string "VAX" from nodename and display
+v=(F:1,L:2) ! Display First char + Last 2 chars of vol
D01::U63:[MOOREJ] > SH DEF
D01::U63:[MOOREJ] > WRITE SYS$OUTPUT F$TRNLNM("SYS$NODE")
You can turn off node and volume display with $ SD, -n -v if you
just want the dir - [MOOREJ] >
If the prompt string gets too long as you descend dirs, "default"
abbreviation action is taken to preserve the most relevant info
D01::U63:[MOOREJ] > SD....EXAM*
Is an example or the abbreviation.
There are way too many options to explain briefly so Use SD?
to see basic help SD?? for intermediate and SD??? to see
the whole library of functions.
Another problem mentioned in the thread ... when you run another
which changes the default, what happens? My solution to this
know in advance what programs you expect default changes to come
you can do this:
For instance I use SWING (from decus lib) or DOWN on occassion to
complicated dir trees and everytime I would change default using these
programs my prompt would be incorrect. I added a way to *hook* these
symbols thru my SD routine. It's simple to use .. I specify it as an
to the TOP display flag +|-T
$ sh sym SWING
SW*ING == "@PUB:[UTIL.cswing]cswing"
$ sh sym DOWN
DOWN == "@PUB:[UTIL.down]down"
$ sh sym CLR
CLR == "$cluster$common:clrscrn.exe"
$ SD; +T=(S,C:SW*ING;DOWN;CLR) ! Make these commands 'known'
$ sh sym SWING
SW*ING == "@PUB:[UTIL.com]sd &SWING"
$ sh sym SD$COMMAND_SWING
SD$COMMAND_SWING == "@PUB:[UTIL.cswing]cswing"
So now when one of these commands gets typed, it actually calls SD
'hidden' & function (which invokes the original command SD
and then updates the prompt (or top line display if you were using
hence the 'CLEAR SCREEN' - CLR command would 'redraw' the top bar if
bar/scrolling region was being used).
This is not a perfect solution (one which could "sense" when the
needed to be corrected/updated) but it's as close as I could come and
an adequate job.
Try it! You'll like it.
Sr. Unix Admin / WorkflowOne
- Prev by Date: Re: detect unaligned data access
- Next by Date: Re: Free used AlphaServers
- Previous by thread: ANN: Alpha firmware update CD v7.3 released
- Next by thread: Re: DCL Magic?