3 ;;; Configuration and definitions for Kermit.
5 assign _profile @profile@/
6 assign _dot \v(home).kermit/
9 set command recall-buffer-size 100
10 set escape-character ^]
11 set flow-control /direct-serial rts/cts
12 set flow-control /modem rts/cts
14 set options directory /brief
15 set terminal trigger KERMIT READY TO SERVE...
18 ;; Set the prompt string.
19 def _host \fword(\v(host),1,.)
20 def _pwd \freplace(\freplace(//\v(dir)/,//\v(home),~/),//,)
22 asg _hack set prompt {C-Kermit \v(user)@\m(_host) \m(_pwd)>}
25 ;; Dialling parameters.
26 set dial country-code 44
27 set dial area-code 1223
29 set dial toll-free-area-code 800
31 set dial intl-prefix 00
40 for \%i 1 \v(argc)-1 1 {
42 if def list assign list \m(list) \%1
47 assign awful { set \m(what) directory \m(list) }
51 \m(_profile)kermit/net.shared -
54 \m(_profile)kermit/dial.shared -
57 ;; If my terminal is UTF8 then try to use that consistently. This may not
58 ;; work, but in my world as it is it's quite likely to.
59 set file character-set utf8
61 if not def _lc_ctype if def \$(LC_ALL) assign _lc_ctype \$(LC_ALL)
62 if not def _lc_ctype if def \$(LC_CTYPE) assign _lc_ctype \$(LC_CTYPE)
63 if not def _lc_ctype if def \$(LANG) assign _lc_ctype \$(LANG)
64 if match \m(_lc_ctype) *.utf8 set terminal character-set utf8
66 ;; Set the HTTP proxy from the environment.
67 if def \$(http_proxy) {
68 assign \%n \fsplit(\$(http_proxy),&v,/)
69 set tcp http-proxy \&v[2]
72 ;; Guest virtual consoles are frequently presented as Unix-domain sockets.
75 end 1 Usage: UNIX socket
79 ;; Connect to a kermit SSH subsystem.
82 end 1 Usage: KERMSSH [options] [user@]host
84 pty ssh -enone -st \%* kermit
87 ;; Console over null-modem cable.
89 if > \v(argc) 1 set speed \%1
90 if > \v(argc) 2 set serial \%2
98 ;; Synchronize remote terminal size with local window.
99 def SYNCWINSZ output stty rows \v(rows) columns \v(cols)\13
101 ;; Special cases for particular target hosts.
104 telnet guvnor.distorted.org.uk
108 set host /network-type:pty ssh -enone -t \%1
110 input 15 \fpattern({{{password:,exit}}})
111 if fail end 1 failed to connect
112 if equal \v(inmatch) exit break
113 if equal \v(inmatch) password: {
114 if ! def pass askq pass {password: }
121 jumpts mdw@ts-tfm8.jump.net.uk
123 set control prefixed 30
127 set terminal lf-display crlf
132 set carrier-watch off
138 ;; Local configuration.
139 if exist \m(_dot)config take \m(_dot)config