]> CyberLeo.Net >> Repos - FreeBSD/releng/9.0.git/blob - lib/libedit/editline.3
Copy stable/9 to releng/9.0 as part of the FreeBSD 9.0-RELEASE release
[FreeBSD/releng/9.0.git] / lib / libedit / editline.3
1 .\"     $NetBSD: editline.3,v 1.55 2007/01/12 16:31:13 christos Exp $
2 .\"
3 .\" Copyright (c) 1997-2003 The NetBSD Foundation, Inc.
4 .\" All rights reserved.
5 .\"
6 .\" This file was contributed to The NetBSD Foundation by Luke Mewburn.
7 .\"
8 .\" Redistribution and use in source and binary forms, with or without
9 .\" modification, are permitted provided that the following conditions
10 .\" are met:
11 .\" 1. Redistributions of source code must retain the above copyright
12 .\"    notice, this list of conditions and the following disclaimer.
13 .\" 2. Redistributions in binary form must reproduce the above copyright
14 .\"    notice, this list of conditions and the following disclaimer in the
15 .\"    documentation and/or other materials provided with the distribution.
16 .\"
17 .\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
18 .\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
19 .\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
20 .\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
21 .\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
22 .\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
23 .\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
24 .\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
25 .\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
26 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
27 .\" POSSIBILITY OF SUCH DAMAGE.
28 .\"
29 .\" $FreeBSD$
30 .\"
31 .Dd January 12, 2007
32 .Dt EDITLINE 3
33 .Os
34 .Sh NAME
35 .Nm editline ,
36 .Nm el_init ,
37 .Nm el_end ,
38 .Nm el_reset ,
39 .Nm el_gets ,
40 .Nm el_getc ,
41 .Nm el_push ,
42 .Nm el_parse ,
43 .Nm el_set ,
44 .Nm el_get ,
45 .Nm el_source ,
46 .Nm el_resize ,
47 .Nm el_line ,
48 .Nm el_insertstr ,
49 .Nm el_deletestr ,
50 .Nm history_init ,
51 .Nm history_end ,
52 .Nm history ,
53 .Nm tok_init ,
54 .Nm tok_end ,
55 .Nm tok_reset ,
56 .Nm tok_line ,
57 .Nm tok_str
58 .Nd line editor, history and tokenization functions
59 .Sh LIBRARY
60 .Lb libedit
61 .Sh SYNOPSIS
62 .In histedit.h
63 .Ft EditLine *
64 .Fn el_init "const char *prog" "FILE *fin" "FILE *fout" "FILE *ferr"
65 .Ft void
66 .Fn el_end "EditLine *e"
67 .Ft void
68 .Fn el_reset "EditLine *e"
69 .Ft const char *
70 .Fn el_gets "EditLine *e" "int *count"
71 .Ft int
72 .Fn el_getc "EditLine *e" "char *ch"
73 .Ft void
74 .Fn el_push "EditLine *e" "char *str"
75 .Ft int
76 .Fn el_parse "EditLine *e" "int argc" "const char *argv[]"
77 .Ft int
78 .Fn el_set "EditLine *e" "int op" "..."
79 .Ft int
80 .Fn el_get "EditLine *e" "int op" "..."
81 .Ft int
82 .Fn el_source "EditLine *e" "const char *file"
83 .Ft void
84 .Fn el_resize "EditLine *e"
85 .Ft const LineInfo *
86 .Fn el_line "EditLine *e"
87 .Ft int
88 .Fn el_insertstr "EditLine *e" "const char *str"
89 .Ft void
90 .Fn el_deletestr "EditLine *e" "int count"
91 .Ft History *
92 .Fn history_init
93 .Ft void
94 .Fn history_end "History *h"
95 .Ft int
96 .Fn history "History *h" "HistEvent *ev" "int op" "..."
97 .Ft Tokenizer *
98 .Fn tok_init "const char *IFS"
99 .Ft void
100 .Fn tok_end "Tokenizer *t"
101 .Ft void
102 .Fn tok_reset "Tokenizer *t"
103 .Ft int
104 .Fo tok_line
105 .Fa "Tokenizer *t" "const LineInfo *li" "int *argc" "const char **argv[]"
106 .Fa "int *cursorc" "int *cursoro"
107 .Fc
108 .Ft int
109 .Fn tok_str "Tokenizer *t" "const char *str" "int *argc" "const char **argv[]"
110 .Sh DESCRIPTION
111 The
112 .Nm
113 library provides generic line editing, history and tokenization functions,
114 similar to those found in
115 .Xr sh 1 .
116 .Pp
117 These functions are available in the
118 .Nm libedit
119 library (which needs the
120 .Nm libtermcap
121 library).
122 Programs should be linked with
123 .Fl ledit ltermcap .
124 .Sh LINE EDITING FUNCTIONS
125 The line editing functions use a common data structure,
126 .Fa EditLine ,
127 which is created by
128 .Fn el_init
129 and freed by
130 .Fn el_end .
131 .Pp
132 The following functions are available:
133 .Bl -tag -width 4n
134 .It Fn el_init
135 Initialise the line editor, and return a data structure
136 to be used by all other line editing functions.
137 .Fa prog
138 is the name of the invoking program, used when reading the
139 .Xr editrc 5
140 file to determine which settings to use.
141 .Fa fin ,
142 .Fa fout
143 and
144 .Fa ferr
145 are the input, output, and error streams (respectively) to use.
146 In this documentation, references to
147 .Dq the tty
148 are actually to this input/output stream combination.
149 .It Fn el_end
150 Clean up and finish with
151 .Fa e ,
152 assumed to have been created with
153 .Fn el_init .
154 .It Fn el_reset
155 Reset the tty and the parser.
156 This should be called after an error which may have upset the tty's
157 state.
158 .It Fn el_gets
159 Read a line from the tty.
160 .Fa count
161 is modified to contain the number of characters read.
162 Returns the line read if successful, or
163 .Dv NULL
164 if no characters were read or if an error occurred.
165 .It Fn el_getc
166 Read a character from the tty.
167 .Fa ch
168 is modified to contain the character read.
169 Returns the number of characters read if successful, \-1 otherwise.
170 .It Fn el_push
171 Pushes
172 .Fa str
173 back onto the input stream.
174 This is used by the macro expansion mechanism.
175 Refer to the description of
176 .Ic bind
177 .Fl s
178 in
179 .Xr editrc 5
180 for more information.
181 .It Fn el_parse
182 Parses the
183 .Fa argv
184 array (which is
185 .Fa argc
186 elements in size)
187 to execute builtin
188 .Nm
189 commands.
190 If the command is prefixed with
191 .Dq prog:
192 then
193 .Fn el_parse
194 will only execute the command if
195 .Dq prog
196 matches the
197 .Fa prog
198 argument supplied to
199 .Fn el_init .
200 The return value is
201 \-1 if the command is unknown,
202 0 if there was no error or
203 .Dq prog
204 did not match, or
205 1 if the command returned an error.
206 Refer to
207 .Xr editrc 5
208 for more information.
209 .It Fn el_set
210 Set
211 .Nm
212 parameters.
213 .Fa op
214 determines which parameter to set, and each operation has its
215 own parameter list.
216 .Pp
217 The following values for
218 .Fa op
219 are supported, along with the required argument list:
220 .Bl -tag -width 4n
221 .It Dv EL_PROMPT , Fa "char *(*f)(EditLine *)"
222 Define prompt printing function as
223 .Fa f ,
224 which is to return a string that contains the prompt.
225 .It Dv EL_RPROMPT , Fa "char *(*f)(EditLine *)"
226 Define right side prompt printing function as
227 .Fa f ,
228 which is to return a string that contains the prompt.
229 .It Dv EL_TERMINAL , Fa "const char *type"
230 Define terminal type of the tty to be
231 .Fa type ,
232 or to
233 .Ev TERM
234 if
235 .Fa type
236 is
237 .Dv NULL .
238 .It Dv EL_EDITOR , Fa "const char *mode"
239 Set editing mode to
240 .Fa mode ,
241 which must be one of
242 .Dq emacs
243 or
244 .Dq vi .
245 .It Dv EL_SIGNAL , Fa "int flag"
246 If
247 .Fa flag
248 is non-zero,
249 .Nm
250 will install its own signal handler for the following signals when
251 reading command input:
252 .Dv SIGCONT ,
253 .Dv SIGHUP ,
254 .Dv SIGINT ,
255 .Dv SIGQUIT ,
256 .Dv SIGSTOP ,
257 .Dv SIGTERM ,
258 .Dv SIGTSTP ,
259 and
260 .Dv SIGWINCH .
261 Otherwise, the current signal handlers will be used.
262 .It Dv EL_BIND , Xo
263 .Fa "const char *" ,
264 .Fa "..." ,
265 .Dv NULL
266 .Xc
267 Perform the
268 .Ic bind
269 builtin command.
270 Refer to
271 .Xr editrc 5
272 for more information.
273 .It Dv EL_ECHOTC , Xo
274 .Fa "const char *" ,
275 .Fa "..." ,
276 .Dv NULL
277 .Xc
278 Perform the
279 .Ic echotc
280 builtin command.
281 Refer to
282 .Xr editrc 5
283 for more information.
284 .It Dv EL_SETTC , Xo
285 .Fa "const char *" ,
286 .Fa "..." ,
287 .Dv NULL
288 .Xc
289 Perform the
290 .Ic settc
291 builtin command.
292 Refer to
293 .Xr editrc 5
294 for more information.
295 .It Dv EL_SETTY , Xo
296 .Fa "const char *" ,
297 .Fa "..." ,
298 .Dv NULL
299 .Xc
300 Perform the
301 .Ic setty
302 builtin command.
303 Refer to
304 .Xr editrc 5
305 for more information.
306 .It Dv EL_TELLTC , Xo
307 .Fa "const char *" ,
308 .Fa "..." ,
309 .Dv NULL
310 .Xc
311 Perform the
312 .Ic telltc
313 builtin command.
314 Refer to
315 .Xr editrc 5
316 for more information.
317 .It Dv EL_ADDFN , Xo
318 .Fa "const char *name" ,
319 .Fa "const char *help" ,
320 .Fa "unsigned char (*func)(EditLine *e, int ch)"
321 .Xc
322 Add a user defined function,
323 .Fn func ,
324 referred to as
325 .Fa name
326 which is invoked when a key which is bound to
327 .Fa name
328 is entered.
329 .Fa help
330 is a description of
331 .Fa name .
332 At invocation time,
333 .Fa ch
334 is the key which caused the invocation.
335 The return value of
336 .Fn func
337 should be one of:
338 .Bl -tag -width "CC_REDISPLAY"
339 .It Dv CC_NORM
340 Add a normal character.
341 .It Dv CC_NEWLINE
342 End of line was entered.
343 .It Dv CC_EOF
344 EOF was entered.
345 .It Dv CC_ARGHACK
346 Expecting further command input as arguments, do nothing visually.
347 .It Dv CC_REFRESH
348 Refresh display.
349 .It Dv CC_REFRESH_BEEP
350 Refresh display, and beep.
351 .It Dv CC_CURSOR
352 Cursor moved, so update and perform
353 .Dv CC_REFRESH .
354 .It Dv CC_REDISPLAY
355 Redisplay entire input line.
356 This is useful if a key binding outputs extra information.
357 .It Dv CC_ERROR
358 An error occurred.
359 Beep, and flush tty.
360 .It Dv CC_FATAL
361 Fatal error, reset tty to known state.
362 .El
363 .It Dv EL_HIST , Xo
364 .Fa "History *(*func)(History *, int op, ...)" ,
365 .Fa "const char *ptr"
366 .Xc
367 Defines which history function to use, which is usually
368 .Fn history .
369 .Fa ptr
370 should be the value returned by
371 .Fn history_init .
372 .It Dv EL_EDITMODE , Fa "int flag"
373 If
374 .Fa flag
375 is non-zero,
376 editing is enabled (the default).
377 Note that this is only an indication, and does not
378 affect the operation of
379 .Nm .
380 At this time, it is the caller's responsibility to
381 check this
382 (using
383 .Fn el_get )
384 to determine if editing should be enabled or not.
385 .It Dv EL_GETCFN , Fa "int (*f)(EditLine *, char *c)"
386 Define the character reading function as
387 .Fa f ,
388 which is to return the number of characters read and store them in
389 .Fa c .
390 This function is called internally by
391 .Fn el_gets
392 and
393 .Fn el_getc .
394 The builtin function can be set or restored with the special function
395 name
396 .Dv EL_BUILTIN_GETCFN .
397 .It Dv EL_CLIENTDATA , Fa "void *data"
398 Register
399 .Fa data
400 to be associated with this EditLine structure.
401 It can be retrieved with the corresponding
402 .Fn el_get
403 call.
404 .It Dv EL_SETFP , Fa "int fd" , Fa "FILE *fp"
405 Set the current
406 .Nm editline
407 file pointer for
408 .Dq input
409 .Fa fd
410 =
411 .Dv 0 ,
412 .Dq output
413 .Fa fd
414 =
415 .Dv 1 ,
416 or
417 .Dq error
418 .Fa fd
419 =
420 .Dv 2
421 from
422 .Fa fp .
423 .El
424 .It Fn el_get
425 Get
426 .Nm
427 parameters.
428 .Fa op
429 determines which parameter to retrieve into
430 .Fa result .
431 Returns 0 if successful, \-1 otherwise.
432 .Pp
433 The following values for
434 .Fa op
435 are supported, along with actual type of
436 .Fa result :
437 .Bl -tag -width 4n
438 .It Dv EL_PROMPT , Fa "char *(*f)(EditLine *)"
439 Return a pointer to the function that displays the prompt.
440 .It Dv EL_RPROMPT , Fa "char *(*f)(EditLine *)"
441 Return a pointer to the function that displays the rightside prompt.
442 .It Dv EL_EDITOR , Fa "const char *"
443 Return the name of the editor, which will be one of
444 .Dq emacs
445 or
446 .Dq vi .
447 .It Dv EL_GETTC , Fa "const char *name" , Fa "void *value"
448 Return non-zero if
449 .Fa name
450 is a valid
451 .Xr termcap 5
452 capability
453 and set
454 .Fa value
455 to the current value of that capability.
456 .It Dv EL_SIGNAL , Fa "int *"
457 Return non-zero if
458 .Nm
459 has installed private signal handlers (see
460 .Fn el_get
461 above).
462 .It Dv EL_EDITMODE , Fa "int *"
463 Return non-zero if editing is enabled.
464 .It Dv EL_GETCFN , Fa "int (**f)(EditLine *, char *)"
465 Return a pointer to the function that read characters, which is equal to
466 .Dv EL_BUILTIN_GETCFN
467 in the case of the default builtin function.
468 .It Dv EL_CLIENTDATA , Fa "void **data"
469 Retrieve
470 .Fa data
471 previously registered with the corresponding
472 .Fn el_set
473 call.
474 .It Dv EL_UNBUFFERED , Fa "int"
475 Sets or clears unbuffered mode.
476 In this mode,
477 .Fn el_gets
478 will return immediately after processing a single character.
479 .It Dv EL_PREP_TERM , Fa "int"
480 Sets or clears terminal editing mode.
481 .It Dv EL_GETFP , Fa "int fd", Fa "FILE **fp"
482 Return in
483 .Fa fp
484 the current
485 .Nm editline
486 file pointer for
487 .Dq input
488 .Fa fd
489 =
490 .Dv 0 ,
491 .Dq output
492 .Fa fd
493 =
494 .Dv 1 ,
495 or
496 .Dq error
497 .Fa fd
498 =
499 .Dv 2 .
500 .El
501 .It Fn el_source
502 Initialise
503 .Nm
504 by reading the contents of
505 .Fa file .
506 .Fn el_parse
507 is called for each line in
508 .Fa file .
509 If
510 .Fa file
511 is
512 .Dv NULL ,
513 try
514 .Pa $PWD/.editrc
515 then
516 .Pa $HOME/.editrc .
517 Refer to
518 .Xr editrc 5
519 for details on the format of
520 .Fa file .
521 .It Fn el_resize
522 Must be called if the terminal size changes.
523 If
524 .Dv EL_SIGNAL
525 has been set with
526 .Fn el_set ,
527 then this is done automatically.
528 Otherwise, it is the responsibility of the application to call
529 .Fn el_resize
530 on the appropriate occasions.
531 .It Fn el_line
532 Return the editing information for the current line in a
533 .Fa LineInfo
534 structure, which is defined as follows:
535 .Bd -literal
536 typedef struct lineinfo {
537     const char *buffer;    /* address of buffer */
538     const char *cursor;    /* address of cursor */
539     const char *lastchar;  /* address of last character */
540 } LineInfo;
541 .Ed
542 .Pp
543 .Fa buffer
544 is not NUL terminated.
545 This function may be called after
546 .Fn el_gets
547 to obtain the
548 .Fa LineInfo
549 structure pertaining to line returned by that function,
550 and from within user defined functions added with
551 .Dv EL_ADDFN .
552 .It Fn el_insertstr
553 Insert
554 .Fa str
555 into the line at the cursor.
556 Returns \-1 if
557 .Fa str
558 is empty or will not fit, and 0 otherwise.
559 .It Fn el_deletestr
560 Delete
561 .Fa count
562 characters before the cursor.
563 .El
564 .Sh HISTORY LIST FUNCTIONS
565 The history functions use a common data structure,
566 .Fa History ,
567 which is created by
568 .Fn history_init
569 and freed by
570 .Fn history_end .
571 .Pp
572 The following functions are available:
573 .Bl -tag -width 4n
574 .It Fn history_init
575 Initialise the history list, and return a data structure
576 to be used by all other history list functions.
577 .It Fn history_end
578 Clean up and finish with
579 .Fa h ,
580 assumed to have been created with
581 .Fn history_init .
582 .It Fn history
583 Perform operation
584 .Fa op
585 on the history list, with optional arguments as needed by the
586 operation.
587 .Fa ev
588 is changed accordingly to operation.
589 The following values for
590 .Fa op
591 are supported, along with the required argument list:
592 .Bl -tag -width 4n
593 .It Dv H_SETSIZE , Fa "int size"
594 Set size of history to
595 .Fa size
596 elements.
597 .It Dv H_GETSIZE
598 Get number of events currently in history.
599 .It Dv H_END
600 Cleans up and finishes with
601 .Fa h ,
602 assumed to be created with
603 .Fn history_init .
604 .It Dv H_CLEAR
605 Clear the history.
606 .It Dv H_FUNC , Xo
607 .Fa "void *ptr" ,
608 .Fa "history_gfun_t first" ,
609 .Fa "history_gfun_t next" ,
610 .Fa "history_gfun_t last" ,
611 .Fa "history_gfun_t prev" ,
612 .Fa "history_gfun_t curr" ,
613 .Fa "history_sfun_t set" ,
614 .Fa "history_vfun_t clear" ,
615 .Fa "history_efun_t enter" ,
616 .Fa "history_efun_t add"
617 .Xc
618 Define functions to perform various history operations.
619 .Fa ptr
620 is the argument given to a function when it is invoked.
621 .It Dv H_FIRST
622 Return the first element in the history.
623 .It Dv H_LAST
624 Return the last element in the history.
625 .It Dv H_PREV
626 Return the previous element in the history.
627 .It Dv H_NEXT
628 Return the next element in the history.
629 .It Dv H_CURR
630 Return the current element in the history.
631 .It Dv H_SET
632 Set the cursor to point to the requested element.
633 .It Dv H_ADD , Fa "const char *str"
634 Append
635 .Fa str
636 to the current element of the history, or perform the
637 .Dv H_ENTER
638 operation with argument
639 .Fa str
640 if there is no current element.
641 .It Dv H_APPEND , Fa "const char *str"
642 Append
643 .Fa str
644 to the last new element of the history.
645 .It Dv H_ENTER , Fa "const char *str"
646 Add
647 .Fa str
648 as a new element to the history, and, if necessary,
649 removing the oldest entry to keep the list to the created size.
650 If
651 .Dv H_SETUNIQUE
652 was has been called with a non-zero arguments, the element
653 will not be entered into the history if its contents match
654 the ones of the current history element.
655 If the element is entered
656 .Fn history
657 returns 1, if it is ignored as a duplicate returns 0.
658 Finally
659 .Fn history
660 returns \-1 if an error occurred.
661 .It Dv H_PREV_STR , Fa "const char *str"
662 Return the closest previous event that starts with
663 .Fa str .
664 .It Dv H_NEXT_STR , Fa "const char *str"
665 Return the closest next event that starts with
666 .Fa str .
667 .It Dv H_PREV_EVENT , Fa "int e"
668 Return the previous event numbered
669 .Fa e .
670 .It Dv H_NEXT_EVENT , Fa "int e"
671 Return the next event numbered
672 .Fa e .
673 .It Dv H_LOAD , Fa "const char *file"
674 Load the history list stored in
675 .Fa file .
676 .It Dv H_SAVE , Fa "const char *file"
677 Save the history list to
678 .Fa file .
679 .It Dv H_SETUNIQUE , Fa "int unique"
680 Set flag that adjacent identical event strings should not be entered
681 into the history.
682 .It Dv H_GETUNIQUE
683 Retrieve the current setting if adjacent identical elements should
684 be entered into the history.
685 .It Dv H_DEL , Fa "int e"
686 Delete the event numbered
687 .Fa e .
688 This function is only provided for
689 .Xr readline 3
690 compatibility.
691 The caller is responsible for free'ing the string in the returned
692 .Fa HistEvent .
693 .El
694 .Pp
695 The
696 .Fn history
697 function returns \*[Ge] 0 if the operation
698 .Fa op
699 succeeds.
700 Otherwise, \-1 is returned and
701 .Fa ev
702 is updated to contain more details about the error.
703 .El
704 .Sh TOKENIZATION FUNCTIONS
705 The tokenization functions use a common data structure,
706 .Fa Tokenizer ,
707 which is created by
708 .Fn tok_init
709 and freed by
710 .Fn tok_end .
711 .Pp
712 The following functions are available:
713 .Bl -tag -width 4n
714 .It Fn tok_init
715 Initialise the tokenizer, and return a data structure
716 to be used by all other tokenizer functions.
717 .Fa IFS
718 contains the Input Field Separators, which defaults to
719 .Aq space ,
720 .Aq tab ,
721 and
722 .Aq newline
723 if
724 .Dv NULL .
725 .It Fn tok_end
726 Clean up and finish with
727 .Fa t ,
728 assumed to have been created with
729 .Fn tok_init .
730 .It Fn tok_reset
731 Reset the tokenizer state.
732 Use after a line has been successfully tokenized
733 by
734 .Fn tok_line
735 or
736 .Fn tok_str
737 and before a new line is to be tokenized.
738 .It Fn tok_line
739 Tokenize
740 .Fa li ,
741 if successful, modify
742 .Fa argv
743 to contain the words,
744 .Fa argc
745 to contain the number of words,
746 .Fa cursorc
747 (if not
748 .Dv NULL )
749 to contain the index of the word containing the cursor,
750 and
751 .Fa cursoro
752 (if not
753 .Dv NULL )
754 to contain the offset within
755 .Fa argv[cursorc]
756 of the cursor.
757 .Pp
758 Returns
759 0 if successful,
760 \-1 for an internal error,
761 1 for an unmatched single quote,
762 2 for an unmatched double quote,
763 and
764 3 for a backslash quoted
765 .Aq newline .
766 A positive exit code indicates that another line should be read
767 and tokenization attempted again.
768 .It Fn tok_str
769 A simpler form of
770 .Fn tok_line ;
771 .Fa str
772 is a NUL terminated string to tokenize.
773 .El
774 .\"XXX.Sh EXAMPLES
775 .\"XXX: provide some examples
776 .Sh SEE ALSO
777 .Xr sh 1 ,
778 .Xr signal 3 ,
779 .Xr termcap 3 ,
780 .Xr editrc 5 ,
781 .Xr termcap 5
782 .Sh HISTORY
783 The
784 .Nm
785 library first appeared in
786 .Bx 4.4 .
787 .Dv CC_REDISPLAY
788 appeared in
789 .Nx 1.3 .
790 .Dv CC_REFRESH_BEEP
791 and
792 .Dv EL_EDITMODE
793 appeared in
794 .Nx 1.4 .
795 .Dv EL_RPROMPT
796 appeared in
797 .Nx 1.5 .
798 .Sh AUTHORS
799 .An -nosplit
800 The
801 .Nm
802 library was written by
803 .An Christos Zoulas .
804 .An Luke Mewburn
805 wrote this manual and implemented
806 .Dv CC_REDISPLAY ,
807 .Dv CC_REFRESH_BEEP ,
808 .Dv EL_EDITMODE ,
809 and
810 .Dv EL_RPROMPT .
811 .Sh BUGS
812 At this time, it is the responsibility of the caller to
813 check the result of the
814 .Dv EL_EDITMODE
815 operation of
816 .Fn el_get
817 (after an
818 .Fn el_source
819 or
820 .Fn el_parse )
821 to determine if
822 .Nm
823 should be used for further input.
824 I.e.,
825 .Dv EL_EDITMODE
826 is purely an indication of the result of the most recent
827 .Xr editrc 5
828 .Ic edit
829 command.