$NetBSD: editrc.5,v 1.32 2016/05/22 23:54:20 christos Exp $ Copyright (c) 1997-2000 The NetBSD Foundation, Inc. All rights reserved. This file was contributed to The NetBSD Foundation by Luke Mewburn. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redist...
NAMEeditrc - configuration file for editline library
DESCRIPTIONThe file defines various settings to be used by the editline(3) library.
The format of each line is:
[prog:]command [arg ...]
command is one of the editline(3) builtin commands. Refer to Sx BUILTIN COMMANDS for more information.
prog is the program name string that a program defines when it calls el_init3 to set up editline(3), which is usually argv command will be executed for any program which matches prog
prog may also be a regex(3) style regular expression, in which case command will be executed for any program that matches the regular expression.
If prog is absent, command is executed for all programs.
BUILTIN COMMANDSThe editline library has some builtin commands, which affect the way that the line editing and history functions operate. These are based on similar named builtins present in the tcsh(1) shell.
The following builtin commands are available:
- bind [-aeklrsv [key [command ] ] ]
Without options and arguments, list all bound keys and macros, and
the editor command or input string to which each one is bound.
is supplied, show the binding for that key or macro.
is supplied, bind the editor
to that key or macro.
The options are as follows:
- List or change key bindings in the vi(1) mode alternate (command mode) key map.
- Bind all keys to the standard GNU Emacs-like bindings.
- key is interpreted as a symbolic arrow key name, which may be one of `up' `down' `left' or `right'
- List all editor commands and a short description of each.
- Remove the binding of the key or macro key
- Define a keyboard macro rather than a key binding or command macro: command is taken as a literal string and appended to the input queue whenever key is typed. Bound keys and macros in command are themselves reinterpreted, and this continues for ten levels of interpretation.
- Bind all keys to the standard vi(1)Ns-like bindings.
The editline(7) manual documents all editor commands and contains more information about macros and the input queue.
key and command can contain control characters of the form `^ character ' Po e.g. `^A' Pc , and the following backslashed escape sequences:
- Carriage return
- Horizontal tab
- Vertical tab
- \ nnn
- The ASCII character corresponding to the octal number nnn
`\' nullifies the special meaning of the following character, if it has any, notably `\' and `^'
- echotc [-sv arg ... ]
Exercise terminal capabilities given in
the value of that capability is printed, with
indicating that the terminal does or does not have that capability.
-s returns an empty string for non-existent capabilities, rather than causing an error. -v causes messages to be verbose.
- edit [on | off ]
- Enable or disable the editline functionality in a program.
- history list | size n | unique n
- The list command lists all entries in the history. The size command sets the history size to n entries. The unique command controls if history should keep duplicate entries. If n is non zero, only keep unique history entries. If n is zero, then keep all entries (the default).
- settc cap val
- Set the terminal capability cap to val as defined in termcap(5). No sanity checking is done.
- setty [-a [-d [-q [-x [+mode ] ] ] ] ]
Oo Ar -mode Oc Oo Ar mode Oc Oo Ar char=c Oc
Control which tty modes that
won't allow the user to change.
to act on the
set of tty modes respectively; defaulting to
Without other arguments, setty lists the modes in the chosen set which are fixed on Po `+mode' Pc or off Po `-mode' Pc . -a lists all tty modes in the chosen set regardless of the setting. With +mode -mode or mode fixes mode on or off or removes control of mode in the chosen set.
Setty can also be used to set tty characters to particular values using char=value If value is empty then the character is set to _POSIX_VDISABLE
- List the values of all the terminal capabilities (see termcap(5)).
- User configuration file for the editline(3) library.