1############################################################################### 2# 3# this file contains user preferences for GNU APL. 4# 5# It should be placed into 6# 7# (1) in sub-directory gnu-apl.d of the system configuration directory, and/or 8# (2) in folder .config/gnu-apl/ in the user's home directory. 9# 10# In both cases the file name must be 'preferences'. 11# 12# The system configuration directory is usually /etc or /etc/local 13# It can be overridden by ./configure --sysconfdir=something-else 14# 15# If both files are present then (1) is read before (2) so that for 16# contradicting settings in both files (2) prevails. 17# 18# Many settings can also be changed by command line options; the command line 19# options take precedence over settings in (1) or (2). 20# 21# The initial content of this files contains all possible settings, but 22# commented out. You should not remove lines but rather comment or 23# uncomment them. 24# 25# The meaning of most settings should be obvious; if not, then please refer to 26# the more detailed desctption in the file README-9-Post-Installation, located 27# in the top-level directory of the GNU APL package. 28 29############################################################################### 30# 31# WELCOME MESSAGE 32# 33# Print (or don't) a welcome message on start-up 34# 35# The corresponding command line options is --silent 36# 37 Welcome Yes (default) 38# Welcome No 39# 40 41 42############################################################################### 43# 44# OUTPUT COLORING 45# 46# Output coloring can cause problems when, for example: 47# 48# (a) you run GNU APL as script 49# (b) you use a black background 50# (c) you run GNU APL from emacs 51# (d) you run GNU APL from a different terminal than color xterm 52# 53# In case (a) you should use the --script command line option and 54# leave Color as is. 55# 56# In cases (b), (c), and (d) you can uncomment the 'Color No' line below. 57# This only affects the initial state of output coloring; you can 58# re-enable colors later with APL command ]XTERM ON. 59# 60# The corresponding command line options are --Color and --noColor 61# 62# If your terminal does not understand the ANSI escape sequences, 63# or if you don't like to provide escape sequences, then you can set Color 64# to "curses" and set color numbers instead of escape sequences below. This 65# requires that certain environment variables (e.g. TERM) are set properly 66# and that your terminfo database contains the terminal you use. 67# 68 Color ANSI (default) 69# Color CURSES 70# Color No 71# 72# If you want to disable coloring initially, but switch to curses if the 73# command ]COLOR (or the equivalent but now obsolete command ]XTERM) 74# is given later on, then you can give the color command twice: 75# 76# Color CURSES 77# Color No 78# 79 80 81############################################################################### 82# 83# OUTPUT COLOR ESCAPE SEQUENCES FOR ANSI TERMINALS 84# 85# Output coloring is implemented as follows: 86# 87# There are 4 output channels called CIN, COUT, CERR, and UERR 88# 89# CIN is the echo of the input typed by the user, 90# COUT is the normal output of the APL interpreter, 91# CERR is additional error information, in particular logging. 92# UERR is output of the APL interpreter containing error messages, 93# 94# CIN, COUT, and UERR appear on stdout while CERR appears on stderr. 95# Normally stdout and stderr are both displayed on the same terminal, 96# but output redirection in the shell can make a difference. 97# 98# When the interpreter changes from one output channel to another, for 99# instance from CIN to COUT after the user has entered a line, then an 100# escape sequence (actually, any short sequence of characters) is sent 101# to the real output channel (i,e. stdout or stderr). The new channel 102# determines which sequence is sent: 103# 104# CIN: CIN-SEQUENCE CLEAR-EOL 105# COUT: COUT-SEQUENCE CLEAR-EOL 106# CERR: CERR-SEQUENCE CLEAR-EOL 107#UCERR: UERR-SEQUENCE CLEAR-EOL 108# 109# In addition, when the interpreter exists, then a sequence 110# 111# RESET-SEQUENCE CLEAR-EOL 112# 113# is sent which should set the colors to their initial state. 114# 115# The reason for sending CLEAR-EOL (i.e. clear to end of line) is to color 116# the entire next line not only the chars printed on the next line. 117# 118# Unfortunately it is difficult, if not impossible, to read the current 119# color setting from the terminal. Therefore the following is assumed: 120# 121# "GNU APL is started in a color xterm with white background". 122# 123# Color xterm is a VT100 (or ANSI) compatible terminal emulation. 124# If this assumption is correct, then everything should be fine. Otherwise 125# you may want to change the escape sequence sent to the terminal below. 126# The numbers below are the decimal values of the bytes sent to the terminal; 127# 27 is the escape character, for example. In order to change some or all 128# sequences, uncomment the corresponding line and change the hex numbers 129# (most likely the columns background and foreground). 130# Each sequence can be up to 20 characters long. 131# 132# The default setting in GNU APL assumes a VT100 terminal with a white 133# background, which correspnds to the following setup: 134# 135# VT100: foreground background 136# color | | color 137# V V 138# general color format; ESC [ 0 ; 3 fg ; 4 bg m 139# CIN-SEQUENCE ESC [ 0 ; 3 0 ; 4 7 m 140# COUT-SEQUENCE ESC [ 0 ; 3 9 ; 4 9 m 141# CERR-SEQUENCE ESC [ 0 ; 3 5 ; 4 9 m 142# UERR-SEQUENCE ESC [ 0 ; 3 5 ; 4 9 m 143# RESET-SEQUENCE ESC [ 0 ; 3 9 ; 4 9 m 144# CLEAR-EOL-SEQUENCE ESC [ K 145# CLEAR-EOS-SEQUENCE ESC [ J 146# 147# On a black background (still assuming VT100 so that the CLEAR-EOL-SEQUENCE 148# does not need to be re-defined), the following may be more suitable: 149# 150# CIN-SEQUENCE 1b 5b 30 3b 33 32 3b 34 30 6d // ESC [0;32;40m 151# COUT-SEQUENCE 1b 5b 30 3b 33 37 3b 34 30 6d // ESC [0;37;40m 152# CERR-SEQUENCE 1b 5b 30 3b 33 31 3b 34 30 6d // ESC [0;31;40m 153# UERR-SEQUENCE 1b 5b 30 3b 33 31 3b 34 30 6d // ESC [0;31;40m 154# RESET-SEQUENCE 1b 5b 30 3b 33 37 3b 34 30 6d // ESC [0;37;48m 155# 156# 157 158 159############################################################################### 160# 161# OUTPUT COLOR NUMBER FOR CURSES 162# 163# There is second way of specifying colors that uses the curses library. 164# Instead of specifying the escape sequences sent to the terminal you 165# only need to specify the colors wanted and curses will provide the escape 166# sequences needed. 167# 168# Numbers for colors seem to be (nota bene: the author is color-blind): 169# 170# 0: black 171# 1: blue 172# 2: green 173# 3: cyan 174# 4: red 175# 5: magenta 176# 6: yellow 177# 7: white 178# 179# The colors are specified as numbers like this: 180# 181# CIN-FOREGROUND 0 182# CIN-BACKGROUND 7 183# COUT-FOREGROUND 2 184# COUT-BACKGROUND 7 185# CERR-FOREGROUND 5 186# CERR-BACKGROUND 8 187# UERR-FOREGROUND 5 188# UERR-BACKGROUND 8 189# 190# or, for dark background: 191# 192# CIN-FOREGROUND 2 193# CIN-BACKGROUND 0 194# COUT-FOREGROUND 7 195# COUT-BACKGROUND 0 196# CERR-FOREGROUND 5 197# CERR-BACKGROUND 0 198# UERR-FOREGROUND 5 199# UERR-BACKGROUND 0 200# 201# Normally the two methods (escape sequences vs. color numbers) shall not 202# be mixed. If they are mixed then the last entry in this file determines 203# which method will be used. Also, the numbers for colors are different 204# in both methods. 205# 206 207############################################################################### 208# 209# INPUT ESC SEQUENCES 210# 211# Below you can configure the ESC (or other) sequence send by the cursor-up, 212# cursor-down, cursor-left, cursor-right, Home, End, Ins, and Del keys of 213# your keyboard. 214# 215# The sequences can be set explicitly (in the following) or via CURSES 216# The latter (CURSES) may fail work because the sequences reported by 217# CURSES may be different from the sequences sent by the keyboard. 218# 219 Keyboard NOCURSES (default) 220# Keyboard CURSES 221# 222# KEY-CURSOR-UP 1b 5b 41 223# KEY-CURSOR-DOWN 1b 5b 42 224# KEY-CURSOR-RIGHT 1b 5b 43 225# KEY-CURSOR-LEFT 1b 5b 44 226# KEY-CURSOR-END 1b 5b 46 227# KEY-CURSOR-HOME 1b 5b 48 228# KEY-INSMODE 1b 5b 32 7e 229# KEY-DELETE 1b 5b 33 7e 230# 231 232############################################################################### 233# 234# SHARED VARIABLES 235# 236# shared variables ⎕SVO, ⎕SVR, ... fork a helper process (APserver) to 237# communicate with other APL processors. If you do not need these functions 238# then you can prevent starting of APserver by setting SharedVars to Disabled. 239# If SharedVars are disabled then GNU APL starts a little faster and, of 240# course, ⎕SVO and friends won't work. 241# 242# The corresponding command line options are --SV and --noSV 243# 244 SharedVars Enabled (default) 245# SharedVars Disabled 246 247 248############################################################################### 249# 250# LOGGING FACILITIES 251# 252# If dynamic logging is disabled then these settings have no effect. 253# 254# Otherwise you can specify the Logging facilities (numbered 1-37 or more) 255# that shall be turned on when the APL interpreter starts, This option can 256# be used several times. 257# 258# See command ]LOG for available logging facilities 259# 260# The corresponding command line option is -l <num> 261# 262# Logging 1 263# Logging 2 264# ... 265# Logging 37 266 267 268############################################################################### 269# 270# GNU APL uses library numbers from 0 to 9 in commands )LOAD, )SAVE, and )COPY, 271# for example: 272# 273# )LOAD 1 workspace 274# 275# Commands )IN and )OUT use library number 0 implicitly; 276# )LOAD, )SAVE, and )COPY use library number 0 implicitly when no 277# library number is given. 278# 279# The directories corresponding to the library numbers can be configured below. 280# library numbers 3, 4, and 5 are used (and overridden) libraries shipped with 281# GNU APL 282# 283# LIBREF-0 /home/xyz/my-own-libs 284# LIBREF-1 /home/xyz/my-group-libs 285# LIBREF-2 /group/abc/other-libs 286 LIBREF-3 /usr/lib/apl/wslib3 287 LIBREF-4 /usr/lib/apl/wslib4 288 LIBREF-5 /usr/lib/apl/wslib5 289# LIBREF-6 /usr/lib/gnu-apl/lib-6 290# LIBREF-7 /usr/lib/gnu-apl/lib-7 291# LIBREF-8 /usr/lib/gnu-apl/lib-8 292# LIBREF-9 /usr/lib/gnu-apl/lib-9 293# 294 295 296############################################################################### 297# 298# READLINE HISTORY PARAMETERS 299# 300# GNU APL provides a history of lines entered by the user in immediate 301# execution mode and ∇-edit mode. 302# 303# Below the number of history lines and the location of the history file 304# can be configured. 305# 306READLINE_HISTORY_LEN 500 307READLINE_HISTORY_PATH .apl.history 308 309# The history can serve two purposes: to recall lines that were previously 310# and to list what was done (with command )HISTORY). For the latter purpose 311# it is normally convenient to show the new ⎕CR of a function that was edited 312# instead of the command that started the editor. The following parameter 313# controls whether the editor command (like ∇foo ) or the new ⎕CR of the 314# function shall be inserted into the history. 315# 316# The default (modified) shows the editor command if the function was opened 317# but not changed and the new ⎕CR if the function was changed. 318# 319# NABLA-TO-HISTORY Never 320 NABLA-TO-HISTORY Modified (default) 321# NABLA-TO-HISTORY Always 322 323 324############################################################################### 325# 326# CREATE BACKUP BEFORE )SAVE or )DUMP WORKSPACE 327# 328BACKUP_BEFORE_SAVE yes 329 330 331############################################################################### 332# 333# GNU APL assumes a particular layout of your keyboard (and assumes that you 334# do your best to obtain that layout). That assumed layout is shown when you 335# give the ]KEYB command. 336# 337# If your keyboard layout differs from the assumed keyboard for some reason, 338# then the ]KEYB command will show the wrong layout. You can fix this by 339# providing your own keyboard file which (when specified) is shown by the 340# ]KEYB command instead of the assumed layout. 341# 342# You can use one of the files called 'keyboard*.txt' somewhere below the 343# directory named 'support-files' as a starting point for your own layout 344# and uncomment the following setting: 345# 346# KEYBOARD_LAYOUT_FILE /usr/etc/gnu-apl.d/keyboard1.txt 347# KEYBOARD_LAYOUT_FILE /usr/etc/gnu-apl.d/keyboard2.txt 348# 349 350############################################################################### 351# 352# Normally you exit GNU APL by issuing the command )OFF and hitting 353# ^D (aka. end-of-input) has no effect. 354# 355# You can make GNU APL exit after a number of ^Ds in a row by specifying 356# a (small) positive number below. Note thsat the interpreter will always 357# exit if a large number of ^Ds (or EOFs) are read within a short while. 358# 359CONTROL-Ds-TO-EXIT 0 360 361 362############################################################################### 363# 364# Normally GNU APL starts with a ⎕PW of 80 365# 366# If the terminal that you normally use has fewer or more columns, then you 367# may want to specify a different initial value for ⎕PW below. 368# 369# INITIAL-⎕PW 80 370 371 372############################################################################### 373# 374# Setting Old-Multi-Line-Strings to No disables Strings that start with " and 375# span multiple lines. Such strings are converted to a nested vector where each 376# line is one (nested) vector element (discarding the trailing \n, if any). 377# 378# Setting New-Multi-Line-Strings to No disables new-style multi line strings 379# (similar to old-style but using """ to delimit multiple lines). 380# 381# Old=Multi-Line-Strings are only allowed inside ∇-defined functions; in 382# immediate execution the effect of multi-line functions can be achieved 383#with ⎕INP. 384# 385# New-Multi-Line-Strings can be used inside ∇-defined functions and also in 386# immediate execution mode. 387# 388# By default both old-style and new-style multi line strings are enabled, but 389# old-style multi line strings will disappear in the near future. 390# 391# Old-Multi-Line-Strings No 392# New-Multi-Line-Strings No 393 394############################################################################### 395# 396# With the option below you can cause the WINCH signal to change ⎕PW. The 397# intended effect is that resizing of the terminal window causes GNU APL 398# to adapt itself to the new window size. This seems to work on GNU/Linux but 399# may not work on other platforms! USE AT YOUR OWN RISK. 400# 401# WINCH-SETS-⎕PW Yes 402 403############################################################################### 404# 405# with the option below you can perform an automatic )OFF after the last 406# input file (from the -f command line option) was processed. 407# 408# AUTO-OFF Yes 409 410# With the option below you can cause the WINCH signal to change ⎕PW. The 411############################################################################### 412# 413# The following lines show examples of GNU APL capabilities that can be 414# disabled. The security settings are put into profile [1] which means that 415# they only have an effect if: 416# 417# (1) GNU APL was ./configured with SECURITY_LEVEL_WANTED=1 and 418# (2) the profile with which GNU APL was started matches the profile for 419# which the setting was made (if any) 420# 421# If a disabled capability is being used then it will throw a DOMAIN_ERROR 422# and )MORE will indicate a security violation. 423# 424Profile 1 425 disable_Quad_SQL yes # disable ⎕SQL 426 disable_Quad_FIO no # do not disable ⎕FIO 427 disable_native_functions yes # disable A ⎕FX B (native fnctions) 428 429# a profile suitable for the web sockets stuff shipped with GNU APL 430Profile 2 431 432CIN-SEQUENCE E2 93 AA // ⓪ 433COUT-SEQUENCE E2 91 A0 // ① 434CERR-SEQUENCE E2 91 A1 // ② 435UERR-SEQUENCE E2 91 A1 // ② like CERR 436RESET-SEQUENCE // 437CLEAR-EOL-SEQUENCE // 438CLEAR-EOS-SEQUENCE // 439 440