EDITRC(5) | File Formats Manual | EDITRC(5) |
editrc
—
configuration file for editline library
editrc |
The editrc
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 BUILTIN COMMANDS for more information.
prog is the program name string that a program defines when it calls el_init(3) to set up editline(3), which is usually argv[0]. 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.
The 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
[-a
] [-e
]
[-k
] [-l
]
[-r
] [-s
]
[-v
] [key
[command]]-e
-v
-a
-k
-l
-r
-s
command may be one of the commands documented in EDITOR COMMANDS below, or another key.
key and command can contain control characters of the form ‘^character’ (e.g. ‘^A’), and the following backslashed escape sequences:
‘\’ nullifies the special meaning of the following character, if it has any, notably ‘\’ and ‘^’.
echotc
[-sv
] arg
...-s
returns an empty string for
non-existent capabilities, rather than causing an error.
-v
causes messages to be verbose.
edit
[on
| off
]editline
functionality in a
program.history
list | size
n
| unique
n
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).telltc
settc
cap valsetty
[-a
] [-d
]
[-q
] [-x
]
[+mode] [-mode]
[mode] [char=c]editrc
won't allow
the user to change. -d
, -q
or -x
tells setty
to act
on the ‘edit’, ‘quote’ or
‘execute’ set of tty modes respectively; defaulting to
-x
.
Without other arguments, setty
lists
the modes in the chosen set which are fixed on (‘+mode’)
or off (‘-mode’). -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
.
The following editor commands are available for use in key bindings:
vi-paste-next
vi-paste-prev
vi-prev-space-word
vi-prev-word
vi-next-space-word
vi-next-word
vi-change-case
vi-change-meta
vi-insert-at-bol
vi-replace-char
vi-replace-mode
vi-substitute-char
vi-substitute-line
vi-change-to-eol
vi-insert
vi-add
vi-add-at-eol
vi-delete-meta
vi-end-word
vi-to-end-word
vi-undo
vi-command-mode
vi-zero
vi-delete-prev-char
vi-list-or-eof
vi-kill-line-prev
vi-search-prev
vi-search-next
vi-repeat-search-next
vi-repeat-search-prev
vi-next-char
vi-prev-char
vi-to-next-char
vi-to-prev-char
vi-repeat-next-char
vi-repeat-prev-char
em-delete-or-list
em-delete-next-word
em-yank
em-kill-line
em-kill-region
em-copy-region
em-gosmacs-transpose
em-next-word
em-upper-case
em-capitol-case
em-lower-case
em-set-mark
em-exchange-mark
em-universal-argument
em-meta-next
em-toggle-overwrite
em-copy-prev-word
em-inc-search-next
em-inc-search-prev
ed-end-of-file
ed-insert
ed-delete-prev-word
ed-delete-next-char
ed-kill-line
ed-move-to-end
ed-move-to-beg
ed-transpose-chars
ed-next-char
ed-prev-word
ed-prev-char
ed-quoted-insert
ed-digit
ed-argument-digit
ed-unassigned
ed-tty-sigint
ed-tty-dsusp
ed-tty-flush-output
ed-tty-sigquit
ed-tty-sigtstp
ed-tty-stop-output
ed-tty-start-output
ed-newline
ed-delete-prev-char
ed-clear-screen
ed-redisplay
ed-start-over
ed-sequence-lead-in
ed-prev-history
ed-next-history
ed-search-prev-history
ed-search-next-history
ed-prev-line
ed-next-line
ed-command
The editline
library was written by
Christos Zoulas, and this manual was written by Luke Mewburn, with some
sections inspired by tcsh(1).
October 18, 2003 | macOS 14.6 |