man-pages/man5/editrc.5edit.html
2021-03-31 01:06:50 +01:00

668 lines
7.6 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of EDITRC</TITLE>
</HEAD><BODY>
<H1>EDITRC</H1>
Section: Misc. Reference Manual Pages (5edit)<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<BR>BSD mandoc<BR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
<B>editrc</B>
- configuration file for editline library
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B></B>
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
The
<B></B>
file defines various settings to be used by the
editline(3edit)
library.
<P>
The format of each line is:
<P>
<BLOCKQUOTE><TT>[prog:]command [arg ...]</TT></BLOCKQUOTE>
<P>
<I>command</I>
is one of the
editline(3edit)
builtin commands.
Refer to
Sx BUILTIN COMMANDS
for more information.
<P>
<I>prog</I>
is the program name string that a program defines when it calls
el_init3
to set up
editline(3edit),
which is usually
<I>argv[0]</I>
<I>command</I>
will be executed for any program which matches
<I>prog</I>
<P>
<I>prog</I>
may also be a
<A HREF="/cgi-bin/man/man2html?3+regex">regex</A>(3)
style
regular expression, in which case
<I>command</I>
will be executed for any program that matches the regular expression.
<P>
If
<I>prog</I>
is absent,
<I>command</I>
is executed for all programs.
<A NAME="lbAE">&nbsp;</A>
<H2>BUILTIN COMMANDS</H2>
The
<B>editline</B>
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
<A HREF="/cgi-bin/man/man2html?1+tcsh">tcsh</A>(1)
shell.
<P>
The following builtin commands are available:
<DL COMPACT>
<P>
<DT id="1"><B>bind </B>[-<B>aeklrsv </B>[<I>key </I>[<I>command</I>
]
]
]
<DD>
Without options and arguments, list all bound keys and macros, and
the editor command or input string to which each one is bound.
If only
<I>key</I>
is supplied, show the binding for that key or macro.
If
<I>key command</I>
is supplied, bind the editor
<I>command</I>
to that key or macro.
<P>
The options are as follows:
<DL COMPACT>
<P>
<DT id="2"><B>-a</B>
<DD>
List or change key bindings in the
<A HREF="/cgi-bin/man/man2html?1+vi">vi</A>(1)
mode alternate (command mode) key map.
<DT id="3"><B>-e</B>
<DD>
Bind all keys to the standard GNU Emacs-like bindings.
<DT id="4"><B>-k</B>
<DD>
<I>key</I>
is interpreted as a symbolic arrow key name, which may be one of
`up'
`down'
`left'
or
`right'
<DT id="5"><B>-l</B>
<DD>
List all editor commands and a short description of each.
<DT id="6"><B>-r</B>
<DD>
Remove the binding of the key or macro
<I>key</I>
<DT id="7"><B>-s</B>
<DD>
Define a keyboard macro rather than a key binding or command macro:
<I>command</I>
is taken as a literal string and appended to the input queue whenever
<I>key</I>
is typed.
Bound keys and macros in
<I>command</I>
are themselves reinterpreted, and this continues for ten levels of
interpretation.
<DT id="8"><B>-v</B>
<DD>
Bind all keys to the standard
<A HREF="/cgi-bin/man/man2html?1+vi">vi</A>(1)Ns-like
bindings.
</DL>
<P>
<P>
The
editline(7edit)
manual documents all editor commands and contains more information
about macros and the input queue.
<P>
<I>key</I>
and
<I>command</I>
can contain control characters of the form
`<B>^ </B><I>character</I>
'
Po e.g.
`^A'
Pc ,
and the following backslashed escape sequences:
<P>
<DL COMPACT>
<P>
<DT id="9"><B>\a</B>
<DD>
Bell
<DT id="10"><B>\b</B>
<DD>
Backspace
<DT id="11"><B>\e</B>
<DD>
Escape
<DT id="12"><B>\f</B>
<DD>
Formfeed
<DT id="13"><B>\n</B>
<DD>
Newline
<DT id="14"><B>\r</B>
<DD>
Carriage return
<DT id="15"><B>\t</B>
<DD>
Horizontal tab
<DT id="16"><B>\v</B>
<DD>
Vertical tab
<DT id="17"><B>\ </B><I>nnn</I>
<DD>
The ASCII character corresponding to the octal number
<I>nnn</I>
</DL>
<P>
<P>
`\'
nullifies the special meaning of the following character,
if it has any, notably
`\'
and
`^'
<DT id="18"><B>echotc </B>[-<B>sv </B><I>arg ...</I>
]
<DD>
Exercise terminal capabilities given in
<I>arg ...</I>
If
<I>arg</I>
is
`baud'
`cols'
`lines'
`rows'
`meta'
or
`tabs'
the value of that capability is printed, with
``yes''
or
``no''
indicating that the terminal does or does not have that capability.
<P>
-<B>s</B>
returns an empty string for non-existent capabilities, rather than
causing an error.
-<B>v</B>
causes messages to be verbose.
<DT id="19"><B>edit </B>[<B>on | off</B>
]
<DD>
Enable or disable the
<B>editline</B>
functionality in a program.
<DT id="20"><B>history </B><I>list | size </I><B>n | </B><I>unique </I><B>n</B>
<DD>
The
<I>list</I>
command lists all entries in the history.
The
<I>size</I>
command sets the history size to
<B>n</B>
entries.
The
<I>unique</I>
command controls if history should keep duplicate entries.
If
<B>n</B>
is non zero, only keep unique history entries.
If
<B>n</B>
is zero, then keep all entries (the default).
<DT id="21"><B>settc </B><I>cap val</I>
<DD>
Set the terminal capability
<I>cap</I>
to
<I>val</I>
as defined in
<A HREF="/cgi-bin/man/man2html?5+termcap">termcap</A>(5).
No sanity checking is done.
<DT id="22"><B>setty </B>[-<B>a </B>[-<B>d </B>[-<B>q </B>[-<B>x </B>[<I>+mode </I>]
]
]
]
]
<DD>
Oo Ar -mode Oc Oo Ar mode Oc Oo Ar char=c Oc
Control which tty modes that
<B></B>
won't allow the user to change.
-<B>d</B>
-<B>q</B>
or
-<B>x</B>
tells
<B>setty</B>
to act on the
`edit'
`quote'
or
`execute'
set of tty modes respectively; defaulting to
-<B>x</B>
<P>
Without other arguments,
<B>setty</B>
lists the modes in the chosen set which are fixed on
Po `+mode'
Pc or off
Po `-mode'
Pc .
-<B>a</B>
lists all tty modes in the chosen set regardless of the setting.
With
<I>+mode</I>
<I>-mode</I>
or
<I>mode</I>
fixes
<I>mode</I>
on or off or removes control of
<I>mode</I>
in the chosen set.
<P>
<B>Setty</B>
can also be used to set tty characters to particular values using
<I>char=value</I>
If
<I>value</I>
is empty
then the character is set to
<B>_POSIX_VDISABLE</B>
<DT id="23"><B>telltc</B>
<DD>
List the values of all the terminal capabilities (see
<A HREF="/cgi-bin/man/man2html?5+termcap">termcap</A>(5)).
</DL>
<P>
<A NAME="lbAF">&nbsp;</A>
<H2>ENVIRONMENT</H2>
<DL COMPACT>
<P>
<DT id="24"><B>EDITRC</B>
<DD>
Names the default configuration file for the
editline(3edit)
library.
</DL>
<P>
<A NAME="lbAG">&nbsp;</A>
<H2>FILES</H2>
<DL COMPACT>
<P>
<DT id="25"><B>~/.editrc
</B>
<DD>
Last resort, if no other file is specified,
user configuration file for the
editline(3edit)
library.
</DL>
<P>
<A NAME="lbAH">&nbsp;</A>
<H2>SEE ALSO</H2>
editline(3edit),
<A HREF="/cgi-bin/man/man2html?3+regex">regex</A>(3),
<A HREF="/cgi-bin/man/man2html?5+termcap">termcap</A>(5),
editline(7edit)
<A NAME="lbAI">&nbsp;</A>
<H2>AUTHORS</H2>
An -nosplit
The
<B>editline</B>
library was written by
An Christos Zoulas ,
and this manual was written by
An Luke Mewburn ,
with some sections inspired by
<A HREF="/cgi-bin/man/man2html?1+tcsh">tcsh</A>(1).
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="26"><A HREF="#lbAB">NAME</A><DD>
<DT id="27"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="28"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DT id="29"><A HREF="#lbAE">BUILTIN COMMANDS</A><DD>
<DT id="30"><A HREF="#lbAF">ENVIRONMENT</A><DD>
<DT id="31"><A HREF="#lbAG">FILES</A><DD>
<DT id="32"><A HREF="#lbAH">SEE ALSO</A><DD>
<DT id="33"><A HREF="#lbAI">AUTHORS</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:06:03 GMT, March 31, 2021
</BODY>
</HTML>