X-Git-Url: https://git.distorted.org.uk/~mdw/profile/blobdiff_plain/8508a859c33a0e52e44fefc30c0d0983f8c32212..d4e04126f8385099f92708dcce5b2250b071ad6b:/dot/mykermrc.in diff --git a/dot/mykermrc.in b/dot/mykermrc.in index 9baf517..8dac41b 100644 --- a/dot/mykermrc.in +++ b/dot/mykermrc.in @@ -6,6 +6,7 @@ assign _profile @profile@/ assign _dot \v(home).kermit/ ;; General stuff. +set command recall-buffer-size 100 set escape-character ^] set flow-control /direct-serial rts/cts set flow-control /modem rts/cts @@ -14,6 +15,13 @@ set options directory /brief set terminal trigger KERMIT READY TO SERVE... set transfer pipes on +;; Set the prompt string. +def _host \fword(\v(host),1,.) +def _pwd \freplace(\freplace(//\v(dir)/,//\v(home),~/),//,) +local _hack +asg _hack set prompt {C-Kermit \v(user)@\m(_host) \m(_pwd)>} +do _hack + ;; Dialling parameters. set dial country-code 44 set dial area-code 1223 @@ -23,42 +31,37 @@ set dial ld-prefix 0 set dial intl-prefix 00 ;; Directories. -def _dir_exist { - undef _dir - for \%i 1 \fdim(&v) 1 { - if exist \&v[\%i] { - if def _dir assign _dir \m(_dir) \&v[\%i] - else assign _dir \&v[\%i] +def _set_dir { + local what list awful + assign what \%1 + undef list + shift + + for \%i 1 \v(argc)-1 1 { + if exist \%1 { + if def list assign list \m(list) \%1 + else assign list \%1 } + shift } + assign awful { set \m(what) directory \m(list) } + do awful } - -local \&v -local \%n -array dcl v = - +_set_dir network - \m(_profile)kermit/net.shared - \m(_dot)net.local -local _dir -_dir_exist -set network directory \m(_dir) - -array dcl v = - +_set_dir dial - \m(_profile)kermit/dial.shared - \m(_dot)dial.local -local _dir -_dir_exist -set dial directory \m(_dir) ;; If my terminal is UTF8 then try to use that consistently. This may not ;; work, but in my world as it is it's quite likely to. +set file character-set utf8 local _lc_ctype if not def _lc_ctype if def \$(LC_ALL) assign _lc_ctype \$(LC_ALL) if not def _lc_ctype if def \$(LC_CTYPE) assign _lc_ctype \$(LC_CTYPE) if not def _lc_ctype if def \$(LANG) assign _lc_ctype \$(LANG) -if match \m(_lc_ctype) *.utf8 { - set file character-set utf8 - set terminal character-set utf8 -} +if match \m(_lc_ctype) *.utf8 set terminal character-set utf8 ;; Set the HTTP proxy from the environment. if def \$(http_proxy) { @@ -93,7 +96,7 @@ def CONSOLE { } ;; Synchronize remote terminal size with local window. -def syncwinsz output stty rows \v(rows) columns \v(cols)\13 +def SYNCWINSZ output stty rows \v(rows) columns \v(cols)\13 ;; Local configuration. if exist \m(_dot)config take \m(_dot)config