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