Being somewhat green with OpenVMS, but still trying to "get stuff done", I'd like to make things a little easier in respect of setting terminal height and width.
Presently I can SSH to an OpenVMS-8.4-based server (from a pane within my Tmux session), but, unlike on Linux, the DCL command shell does not automatically pick up my terminal size.
That is, after SSH-ing in, and issuing SHOW TERM
, I get:
Terminal: _FTA31: Device_Type: VT200_Series Owner: <elided>
Input: 9600 LFfill: 0 Width: 80 Parity: None
Output: 9600 CRfill: 0 Page: 24
Terminal Characteristics:
Interactive Echo Type_ahead No Escape
Hostsync TTsync Lowercase Tab
Wrap Scope No Remote Eightbit
Broadcast No Readsync No Form Fulldup
No Modem No Local_echo No Autobaud No Hangup
No Brdcstmbx No DMA No Altypeahd Set_speed
No Commsync Line Editing Overstrike editing No Fallback
No Dialup Secure server No Disconnect No Pasthru
No Syspassword No SIXEL Graphics No Soft Characters No Printer Port
Numeric Keypad ANSI_CRT No Regis No Block_mode
Advanced_video Edit_mode DEC_CRT DEC_CRT2
No DEC_CRT3 No DEC_CRT4 No DEC_CRT5 No Ansi_Color
VMS Style Input <CTRL-H> Backspace
The important bits above are Width: 80
and Page: 24
. This despite the fact that issuing a Tmux :display "H: #{pane_height}, W: #{pane_width}"
shows the following:
H: 51, W: 92
The terminal characteristics then don't get updated automatically, and that may not be surprising given that the terminal seems to be being interpreted as "VT200_Series
". In any case, I've noticed that Tmux is fairly flexible in the sorts of ways it can interact with the terminal, in particular, there's a facility to be able to display a host of terminal attributes by means of the display-message
command; as indicated above, one can "get at" the width and height by means of something like:
:display-message -p "Width: #{pane_width}, Height: #{pane_height}"
The -p
indicates that the result should be output to stdout
(Tmux clears the display and shows the result).
Also, it's possible to set the data in a buffer explicitly by means of the Tmux command set-buffer
, like so:
:set-buffer "Mary had a little lamb..."
And paste the result to a pane, as if it had been entered interactively, using the paste-buffer
Tmux command.
What I'd like to do then is something along these lines:
:setb "SET TERM/PAGE=#{pane_height}/WIDTH=#{pane_width}";\
pasteb;\
send Enter
Of course, the SET TERM/ ...
bit explicitly sets the terminal height and width respectively in OpenVMS.
Sadly, though, it looks like the data
parameter of the set-buffer
command does not undergo "special variable" replacement.
Being somewhat new to both OpenVMS and Tmux, I need some guidance as to how I can do what I need to do here. An alternative, I guess is just to always use a terminal of a certain size and hard-code the size in my LOGIN.COM
script, but I would like "first prize" which is the ability to set that dynamically (if I could get the idea above to work, I would, of course use a bind-key
setting to be able to invoke it quickly).