Improve Kermit configuration.
[profile] / dot / mykermrc.in
CommitLineData
8508a859
MW
1;;; ---kermit---
2;;;
3;;; Configuration and definitions for Kermit.
4
5assign _profile @profile@/
6assign _dot \v(home).kermit/
7
8;; General stuff.
9set escape-character ^]
10set flow-control /direct-serial rts/cts
11set flow-control /modem rts/cts
12set locus local
13set options directory /brief
14set terminal trigger KERMIT READY TO SERVE...
15set transfer pipes on
16
17;; Dialling parameters.
18set dial country-code 44
19set dial area-code 1223
20set dial display on
21set dial toll-free-area-code 800
22set dial ld-prefix 0
23set dial intl-prefix 00
24
25;; Directories.
26def _dir_exist {
27 undef _dir
28 for \%i 1 \fdim(&v) 1 {
29 if exist \&v[\%i] {
30 if def _dir assign _dir \m(_dir) \&v[\%i]
31 else assign _dir \&v[\%i]
32 }
33 }
34}
35
36local \&v
37local \%n
38array dcl v = -
39 \m(_profile)kermit/net.shared -
40 \m(_dot)net.local
41local _dir
42_dir_exist
43set network directory \m(_dir)
44
45array dcl v = -
46 \m(_profile)kermit/dial.shared -
47 \m(_dot)dial.local
48local _dir
49_dir_exist
50set dial directory \m(_dir)
51
52;; If my terminal is UTF8 then try to use that consistently. This may not
53;; work, but in my world as it is it's quite likely to.
54local _lc_ctype
55if not def _lc_ctype if def \$(LC_ALL) assign _lc_ctype \$(LC_ALL)
56if not def _lc_ctype if def \$(LC_CTYPE) assign _lc_ctype \$(LC_CTYPE)
57if not def _lc_ctype if def \$(LANG) assign _lc_ctype \$(LANG)
58if match \m(_lc_ctype) *.utf8 {
59 set file character-set utf8
60 set terminal character-set utf8
61}
62
63;; Set the HTTP proxy from the environment.
64if def \$(http_proxy) {
65 assign \%n \fsplit(\$(http_proxy),&v,/)
66 set tcp http-proxy \&v[2]
67}
68
69;; Guest virtual consoles are frequently presented as Unix-domain sockets.
70def UNIX {
71 if <= \v(argc) 1 -
72 end 1 Usage: UNIX socket
73 pipe nc -U \%1
74}
75
76;; Connect to a kermit SSH subsystem.
77def KERMSSH {
78 if <= \v(argc) 1 -
79 end 1 Usage: KERMSSH [options] [user@]host
80 set clear-channel on
81 pty ssh -enone -st \%* kermit
82}
83
84;; Console over null-modem cable.
85def CONSOLE {
86 if > \v(argc) 1 set speed \%1
87 if > \v(argc) 2 set serial \%2
88 else set serial 8n1
89 set modem type none
90 set carrier-watch off
91 set clear-channel on
92 connect
93}
94
95;; Synchronize remote terminal size with local window.
96def syncwinsz output stty rows \v(rows) columns \v(cols)\13
97
98;; Local configuration.
99if exist \m(_dot)config take \m(_dot)config