History log of /src/lib/libedit/editline.3
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base perseant-exfatfs-base-20240630 perseant-exfatfs-base
# 1.102 04-Feb-2024 andvar

s/interrrupt/interrupt/ in comment and editline(3) man page.


Revision tags: netbsd-10-1-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base
# 1.101 15-Aug-2021 wiz

Add verb to sentence.


# 1.100 15-Aug-2021 christos

Disable attempts to handle EINTR and non-blocking I/O by default. It is
confusing to other programs and unexpected behavior. Reported by Ingo Schwarze.
This behavior is now controlled with EL_SAFEREAD.


Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base netbsd-9-1-RELEASE phil-wifi-20200421 phil-wifi-20200411 is-mlppp-base phil-wifi-20200406 netbsd-9-0-RELEASE netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
# 1.99 18-Nov-2018 christos

Remove utf-8 requirement (Yuichiro NAITO)


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415 pgoyette-compat-0407 pgoyette-compat-0330 pgoyette-compat-0322 pgoyette-compat-0315 pgoyette-compat-base
# 1.98 02-Sep-2017 wiz

branches: 1.98.2; 1.98.4;
Remove trailing whitespace; convert Xr readline to Nm readline, since
we won't get a readline man page in base.


# 1.97 01-Sep-2017 christos

PR/51517: Jay West: Tty settings not restored on exit
PR/51518: Jay West: prompt is interleaved with client output

Both these issues are caused by rl_restore_handler not DTRT; fix
it so that it kills the internal libedit state completely. This is
inefficient, but it works.

Also fix:
1. add append_history()/H_NSAVE_FP
2. call the rl_startup_hook before printing the first prompt as documented.
callint it from rl_initialize breaks python, because the callback ends
up being invoked before the readline module is installed, and we end up
dereferencing a NULL pointer.
3. add el_resize_terminal.

With those changes, s/lreadline/ledit/g in python works.


Revision tags: perseant-stdc-iso10646-base
# 1.96 03-Jul-2017 wiz

Remove workaround for ancient HTML generation code.


# 1.95 27-Jun-2017 christos

mention the limitation of the literal sequence delimiter.


# 1.94 27-Jun-2017 kre

Include EDITRC in doc.


Revision tags: netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1 prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1
# 1.93 10-Apr-2017 abhinav

branches: 1.93.4;
Add missing argument for H_SET.

ok christos@


Revision tags: pgoyette-localcount-20170320 bouyer-socketcan-base pgoyette-localcount-20170107 pgoyette-localcount-20161104 localcount-20160914 pgoyette-localcount-20160806 pgoyette-localcount-20160726 pgoyette-localcount-base
# 1.92 22-May-2016 christos

branches: 1.92.2; 1.92.4;
documentation improvements (Ingo Schwarze)


# 1.91 21-May-2016 christos

Fix the prototype used by EL_GETCFN, mention the associated typedef
name, document the return values, expand the list of affected
functions, warn against using EL_GETCFN, and clarify some wording
and notation. (Ingo Schwarze)


# 1.90 09-May-2016 christos

GNU readline(3) regards history chronologically, that is, from the
perspective of the dawn of time, so "next" means "newer" and "previous"
means "older". Libedit, by contrast, uses reverse chronology and
regards history from the perspective of the present, such that "next"
means "longer ago" and "previous" means "not so long ago".

The following patch fixes previous_history() and next_history()
as proposed by Bastian Maerkisch.

But there is a related problem demonstrated by Bastian's regression
tests that his patch did not fix: next_history() can advance not
only to the newest entry, but beyond it, which core libedit cannot
do. So that feature must be implemented locally in readline.c.

With that, the last of Bastians tests is fixed, test_movement_direction().

This patch also improves libedit documentation to more clearly state
what "previous" and "next" mean. GNU readline documentation is
just as unclear, but we can't easily fix that since libedit doesn't
include its own readline.3 manual.

(Ingo Schwarze)


# 1.89 28-Apr-2016 christos

new man page from Ingo Schwarze.


# 1.88 25-Feb-2016 wiz

Use \- for minus sign, use Ev, use Er.


# 1.87 24-Feb-2016 christos

Fix el_{w,}getc documentation (Ingo Schwarze)


# 1.86 24-Feb-2016 christos

Fixes from OpenBSD via Ingo Schwarze:
1) Missing comma after tok_str in NAME.
OpenBSD rev. 1.38 Sep 10, 2015 (schwarze)
2) Style: void in argument list.
OpenBSD rev. 1.39 Sep 14, 2015 (schwarze)
3) English punctuation: stray comma.
OpenBSD rev. 1.37 Mar 13, 2015 (jmc)


# 1.85 03-Nov-2015 christos

Fix descriptions of el_set functions.
Americanise initialise :-)


# 1.84 25-Dec-2014 wiz

Bump date for previous.


# 1.83 25-Dec-2014 wiz

From Ingo Schwarze, based on changes from Kaspars Bankovskis:
* Document error handling of el_init(), el_set(), el_source(),
and history_init().
* Fix a typo an improve punctuation below H_SETUNIQUE.
* The ellipsis already implies "optional", no need for [].
* Sort options in editrc(5).
* Prevent e.g. rom being misconstrued as the end of a sentence.
* Drop a useless duplicate .Ar macro.
* Put telltc in its proper place in the alphabetical order.
* A few typos in vi editor command names.
* Some missing vi editor command names.
* Some missing author macros.


Revision tags: netbsd-7-base yamt-pagecache-base9 tls-earlyentropy-base tls-maxphys-base
# 1.82 11-May-2014 wiz

branches: 1.82.2;
Add An to authors. Wording.


# 1.81 11-May-2014 christos

Add a history function that takes a FILE pointer; needed for Capsicum.
From Eitan Adler


Revision tags: riastradh-xf86-video-intel-2-7-1-pre-2-21-15 riastradh-drm2-base3 riastradh-drm2-base2 riastradh-drm2-base1 riastradh-drm2-base
# 1.80 12-Jul-2013 christos

branches: 1.80.4;
Add a function to move the cursor.


Revision tags: agc-symver-base
# 1.79 22-Jan-2013 christos

provide an el_init_fd function.


Revision tags: yamt-pagecache-base8
# 1.78 10-Jan-2013 wiz

In 2000, .editrc reading from $PWD was removed. Update the man page.
From LEVAI Daniel via jmc@OpenBSD.


Revision tags: yamt-pagecache-base7 yamt-pagecache-base6
# 1.77 11-Sep-2012 christos

branches: 1.77.2;
PR/46945: Steffen Nurpmeso; el_getc() doesn't document it's setting errno


# 1.76 11-Sep-2012 christos

PR/46941: Steffen Nurpmeso: document EL_BUFFERED


Revision tags: netbsd-6-0-6-RELEASE netbsd-6-1-5-RELEASE netbsd-6-1-4-RELEASE netbsd-6-0-5-RELEASE netbsd-6-1-3-RELEASE netbsd-6-0-4-RELEASE netbsd-6-1-2-RELEASE netbsd-6-0-3-RELEASE netbsd-6-1-1-RELEASE netbsd-6-0-2-RELEASE netbsd-6-1-RELEASE netbsd-6-1-RC4 netbsd-6-1-RC3 netbsd-6-1-RC2 netbsd-6-1-RC1 netbsd-6-0-1-RELEASE matt-nb6-plus-nbase netbsd-6-0-RELEASE netbsd-6-0-RC2 matt-nb6-plus-base netbsd-6-0-RC1 yamt-pagecache-base5 yamt-pagecache-base4 netbsd-6-base yamt-pagecache-base3 yamt-pagecache-base2 yamt-pagecache-base cherry-xenmp-base bouyer-quota2-nbase
# 1.75 27-Feb-2011 christos

branches: 1.75.4;
Fix argument for EL_EDITOR from Jess Thrysoee


Revision tags: bouyer-quota2-base matt-mips64-premerge-20101231
# 1.74 16-Dec-2010 wiz

branches: 1.74.2;
Observe the following spelling:
- wide character (noun)
- wide-character (adjective)

Inspired by jmc@OpenBSD.


# 1.73 03-Jan-2010 wiz

Bump date for historyw -> history_w.


# 1.72 03-Jan-2010 christos

rename historyw -> history_w for consistency.
add wide tst code and make it the default.


# 1.71 31-Dec-2009 christos

- Document and enable wide character support.
- Fix read function compatibility.


Revision tags: matt-premerge-20091211
# 1.70 05-Jul-2009 perry

note that the return value of el_gets doesn't remain valid across
calls.


Revision tags: jym-xensuspend-nbase jym-xensuspend-base
# 1.69 12-May-2009 wiz

Punctuation nit.


# 1.68 11-May-2009 christos

restore binary compatibility by providing new prompt functions that take
an extra literal character.


# 1.67 11-Apr-2009 joerg

Don't use .Xo/.Xc to avoid ancient macro argument limit.


# 1.66 01-Apr-2009 wiz

Readability improvement. Whitespace nits.


# 1.65 31-Mar-2009 christos

Implement literal prompt sequences. Now someone can implement
RL_PROMPT_START_LITERAL/RL_PROMPT_END_LITERAL :-)


# 1.64 10-Mar-2009 wiz

-1 is not a defined value, it is just a value.
On the other hand, minuses need backslashes, otherwise they become hyphens.


# 1.63 10-Mar-2009 christos

make el_gets set the count to -1 on error to distinguish between EOF and
error.


# 1.62 09-Mar-2009 joerg

Fix preamble to match order set out by mdoc(7). Discussed with wiz.


# 1.61 21-Feb-2009 wiz

Restore markup changes (probably accidentally) reverted in previous.


# 1.60 21-Feb-2009 christos

back out all prompt changes. they are not needed.


# 1.59 19-Feb-2009 wiz

Fix wordo, use more markup.


# 1.58 19-Feb-2009 christos

document extra argument.


Revision tags: netbsd-5-2-3-RELEASE netbsd-5-1-5-RELEASE netbsd-5-2-2-RELEASE netbsd-5-1-4-RELEASE netbsd-5-2-1-RELEASE netbsd-5-1-3-RELEASE netbsd-5-2-RELEASE netbsd-5-2-RC1 netbsd-5-1-2-RELEASE netbsd-5-1-1-RELEASE matt-nb5-mips64-premerge-20101231 matt-nb5-pq3-base netbsd-5-1-RELEASE netbsd-5-1-RC4 matt-nb5-mips64-k15 netbsd-5-1-RC3 netbsd-5-1-RC2 netbsd-5-1-RC1 netbsd-5-0-2-RELEASE matt-nb5-mips64-premerge-20091211 matt-nb5-mips64-u2-k2-k4-k7-k8-k9 matt-nb4-mips64-k7-u2a-k9b matt-nb5-mips64-u1-k1-k5 netbsd-5-0-1-RELEASE netbsd-5-0-RELEASE netbsd-5-0-RC4 netbsd-5-0-RC3 netbsd-5-0-RC2 netbsd-5-0-RC1 netbsd-5-base matt-mips64-base2 wrstuden-revivesa-base-3 wrstuden-revivesa-base-2 wrstuden-revivesa-base-1 yamt-pf42-base4 yamt-pf42-base3 hpcarm-cleanup-nbase yamt-pf42-base2 wrstuden-revivesa-base
# 1.57 30-Apr-2008 martin

branches: 1.57.8;
Convert TNF licenses to new 2 clause variant


Revision tags: yamt-pf42-baseX yamt-pf42-base
# 1.56 05-Apr-2008 christos

branches: 1.56.2;
add EL_REFRESH for the benefit of readline


Revision tags: keiichi-mipv6-base matt-armv6-nbase matt-armv6-prevmlocking cube-autoconf-base matt-armv6-base matt-mips64-base hpcarm-cleanup-base
# 1.55 12-Jan-2007 christos

PR/35411: Matthew Wala: inconsistency in editline(3): rename "num" to the
appropriate parameter names.


# 1.54 18-Dec-2006 wiz

Fix xref section. Whitespace cleanups..


# 1.53 15-Dec-2006 christos

add EL_GETFP, and EL_SETFP.


Revision tags: netbsd-4-0-1-RELEASE wrstuden-fixsa-newbase wrstuden-fixsa-base-1 netbsd-4-0-RELEASE netbsd-4-0-RC5 netbsd-4-0-RC4 netbsd-4-0-RC3 netbsd-4-0-RC2 netbsd-4-0-RC1 wrstuden-fixsa-base netbsd-4-base
# 1.52 24-Nov-2006 christos

- Add more readline functions, enough for gdb-6.5
- Make el_get varyadic, and implement EL_GETTC.
- XXX: the EL_SETTC api will change in the future.


# 1.51 21-Aug-2006 christos

Change to a 3 clause copyright after permission of the holders.


Revision tags: abandoned-netbsd-4-base
# 1.50 12-Oct-2005 wiz

Add el_get to SYNOPSIS. From jmc@openbsd.


# 1.49 09-Sep-2005 wiz

Fix double if (from Alexey E. Suslikov via jmc@openbsd).
While here, re-word both H_[GS]ETUNIQUE descriptions so they make
more sense. Bump date.


# 1.48 14-Jul-2005 wiz

Drop trailing whitespace.


# 1.47 14-Jul-2005 christos

PR/30747: David N. Williams: libedit is missing remove_history()
Added, please test.


# 1.46 19-Mar-2005 christos

PR/29738: Rui Paulo: Incorrect tok_line and tok_str declarations.


Revision tags: netbsd-3-1-1-RELEASE netbsd-3-0-3-RELEASE netbsd-3-1-RELEASE netbsd-3-0-2-RELEASE netbsd-3-1-RC4 netbsd-3-1-RC3 netbsd-3-1-RC2 netbsd-3-1-RC1 netbsd-3-0-1-RELEASE netbsd-3-0-RELEASE netbsd-3-0-RC6 netbsd-3-0-RC5 netbsd-3-0-RC4 netbsd-3-0-RC3 netbsd-3-0-RC2 netbsd-3-0-RC1 netbsd-3-base
# 1.45 15-Apr-2004 wiz

Remove duplicate word, from jfb@openbsd via jmc@openbsd.


Revision tags: netbsd-2-0-3-RELEASE netbsd-2-1-RELEASE netbsd-2-1-RC6 netbsd-2-1-RC5 netbsd-2-1-RC4 netbsd-2-1-RC3 netbsd-2-1-RC2 netbsd-2-1-RC1 netbsd-2-0-2-RELEASE netbsd-2-0-1-RELEASE netbsd-2-base netbsd-2-0-RELEASE netbsd-2-0-RC5 netbsd-2-0-RC4 netbsd-2-0-RC3 netbsd-2-0-RC2 netbsd-2-0-RC1 netbsd-2-0-base
# 1.44 05-Dec-2003 wiz

Use Aq instead of <>, quote a minus, drop trailing space.


# 1.43 05-Dec-2003 lukem

Tokenization function enhancements:
* Make tok_init(), tok_end(), tok_reset(), tok_line() and tok_str()
publically available in <histedit.h>
* Documented the public functions in editline(3)
* Renamed tok_line() -> tok_str()
* Added new tok_line() which takes a "const LineInfo *" instead of
"const char *" (the former has "cursor" information), and optionally
return the argv index ("int *cursorc") and offset within that index
("int *cursorv"). This means that completion routines can use the
tokenization code to crack the line and easily find which word the
cursor is at. (mmm, context sensitive completion :)
* Fixed TEST/test.c when using "continuation" lines (unmatched quote
or \ at EOL), and added some more DEBUG messages including highlighting
where the cursor is (with a `_').


# 1.42 04-Nov-2003 christos

s/wth/with/


# 1.41 01-Nov-2003 christos

Explain H_ADD better. from Otto Moerbeek otto at drijf dot net


# 1.40 17-Oct-2003 wiz

Bump date for previous. Replace > with \*[Gt].


# 1.39 16-Oct-2003 christos

More libedit readline emulation functions from: Gerry Swislow
<gerry at certif dot com>


# 1.38 26-Sep-2003 wiz

New sentence, new line; bump date for previous.


# 1.37 26-Sep-2003 christos

Implement enough of readline's 4.0 async mode to make gdb happy. This is
not complete yet, but it seems to work...
This required to introduce an unbuffered mode to el_gets(), but that was
a minor change.


# 1.36 16-Jul-2003 wiz

Bump date for last.


# 1.35 14-Jul-2003 jeremy

Documented the return values from el_get().


# 1.34 06-Jun-2003 wiz

Use Aq Pa instead of Fd \*[Lt]...\*[Gt]. From jmc@openbsd.


# 1.33 16-Apr-2003 wiz

Use
.In header.h
instead of
.Fd #include \*[Lt]header.h\*[Gt]
Much easier to read and write, and supported by groff for ages.
Okayed by ross.


# 1.32 25-Feb-2003 wiz

.Nm does not need a dummy argument ("") before punctuation or
for correct formatting of the SYNOPSIS any longer.


# 1.31 21-Jan-2003 wiz

Replace -1 with \-1 for PostScript output; drop a trailing space and fix two typos.


# 1.30 21-Jan-2003 christos

Add a uniquefier for the history function.


Revision tags: fvdl_fs64_base
# 1.29 01-Oct-2002 wiz

New sentence, new line. From Robert Elz.


# 1.28 18-Aug-2002 yamt

reflect reality.
(3rd arg of el_parse is const.)


Revision tags: netbsd-1-6-PATCH002-RELEASE netbsd-1-6-PATCH002 netbsd-1-6-PATCH002-RC4 netbsd-1-6-PATCH002-RC3 netbsd-1-6-PATCH002-RC2 netbsd-1-6-PATCH002-RC1 netbsd-1-6-PATCH001 netbsd-1-6-PATCH001-RELEASE netbsd-1-6-PATCH001-RC3 netbsd-1-6-PATCH001-RC2 netbsd-1-6-PATCH001-RC1 netbsd-1-6-RELEASE netbsd-1-6-RC3 netbsd-1-6-RC2 netbsd-1-6-RC1 netbsd-1-6-base
# 1.27 20-Feb-2002 wiz

Close quoting.


# 1.26 07-Feb-2002 ross

Generate <>& symbolically.


# 1.25 15-Jan-2002 wiz

Punctuation and whitespace nits, fix a typo.


# 1.24 09-Oct-2001 christos

PR/14188: Anthony Mallet: Provide an opaque data pointer to client programs.


# 1.23 04-Oct-2001 lukem

a couple of minor fixes. originally by Ruslan Ermilov <ru@FreeBSD.org>,
highlighted to me by way of Mike Barcroft <mike@FreeBSD.org> (thanks!)


# 1.22 27-Sep-2001 christos

PR/14067: Anthony Mallet: Provide a programmatic way to set the read_char
function via a new el_set() operation.
Thanks, nicely done :-)


# 1.21 02-Apr-2001 wiz

End sentence with a dot.


Revision tags: netbsd-1-5-PATCH003 netbsd-1-5-PATCH002 netbsd-1-5-PATCH001 netbsd-1-5-RELEASE netbsd-1-5-BETA2 netbsd-1-5-BETA netbsd-1-5-ALPHA2 netbsd-1-5-base minoura-xpg4dl-base
# 1.20 28-Feb-2000 chopps

el_insertstr takes a "const char *" not "char *" now as it doesn't modify
the argument.


Revision tags: wrstuden-devbsize-19991221 wrstuden-devbsize-base
# 1.19 26-Nov-1999 lukem

missing ,


# 1.18 12-Nov-1999 lukem

- implement printing a right-side prompt. code derived from similar work
I wrote for tcsh(1) three years ago.
- implement EL_RPROMPT, which allows a setting/getting of a function which
returns a string to be used as the right-side prompt.
- improve HISTORY and AUTHORS sections in editline(3).
- bump shlib minor version for EL_RPROMPT.

XXX: due to an implementation issue, the rprompt has a 1 space gap before the
edge of the logical screen. editline's logical screen is 1 space less
than the full screen width, so there's a 2 space gap between the rprompt
and the right end of the physical screen. i'm not concerned about this.


Revision tags: comdex-fall-1999-base
# 1.17 02-Jul-1999 simonb

branches: 1.17.4;
More trailing white space.


Revision tags: netbsd-1-4-PATCH003 netbsd-1-4-PATCH002 netbsd-1-4-PATCH001 netbsd-1-4-RELEASE netbsd-1-4-base
# 1.16 22-Mar-1999 garbled

Last of the .Os cleanups. .Os is defined in the tmac.doc-common file,
so we shouldn't override it with versions in the manpages. Wheee!


# 1.15 05-Jan-1999 lukem

fix history() prototype. (d@openbsd.org)


# 1.14 29-Jul-1998 lukem

* add more checks for NULL pointers in passed arguments
* implement el_get(EditLine *, int op, void *result), which does the
inverse of el_set()
* add EL_EDITMODE operation to el_set and el_get; if non zero editing
is enabled (the default).
* add "edit on | off" editrc command, which modifies EL_EDITMODE.
users can now add '*:edit off' in ~/.editrc as an advisory to
disable editing.

NOTE: at this time EL_EDITMODE is just an indication of the
state of the 'edit' command. It's up to the application to check
this after el_source() or el_parse() to determine if editing is still
required.


# 1.13 08-Jun-1998 lukem

documentation is always probably incomplete; don't make an issue of it


# 1.12 01-Jun-1998 lukem

* implement CC_REFRESH_BEEP; as per CC_REFRESH but beep as well. this
is useful in completion when a partial completion is found
* remove entry in BUGS about el_parse(); that was fixed a while ago


# 1.11 20-May-1998 christos

Add H_APPEND to simplify the interface.


# 1.10 20-May-1998 christos

Adjust for changes.


# 1.9 05-Feb-1998 perry

add LIBRARY section to man page


# 1.8 21-Jan-1998 lukem

in el_parse(), use a temporary buffer to store the program name when
comparing, preventing trashing of argv[0]. remove note in man page
warning of former behaviour.


# 1.7 09-Nov-1997 lukem

move description of history() return value


Revision tags: netbsd-1-3-PATCH003 netbsd-1-3-PATCH003-CANDIDATE2 netbsd-1-3-PATCH003-CANDIDATE1 netbsd-1-3-PATCH003-CANDIDATE0 netbsd-1-3-PATCH002 netbsd-1-3-PATCH001 netbsd-1-3-RELEASE netbsd-1-3-BETA netbsd-1-3-base
# 1.6 14-Oct-1997 christos

PR/4257: Jaromir Dolecek: history() has no generic error handling and isn't
reentrant. This changes the interface of the history function, so we need
a major number bump.


# 1.5 30-Jul-1997 jtc

Fix files using old TNF copyright notice


# 1.4 14-Jan-1997 lukem

Implement CC_REDISPLAY, which (unlink CC_REFRESH) redraws the entire input
line (a la ^R). This is useful if the binding outputs information and
mucks up the input line. To be used in ``list-choices'' bindings (refer
to the ^D binding in csh when filec is set)


# 1.3 11-Jan-1997 lukem

RCSid police
editline first appeared in 4.4BSD not NetBSD1.0


# 1.2 11-Jan-1997 lukem

* in el_parse(), don't reference argv[0] if argc < 1 (return -1 instead)
* clarify return value of el_parse()


# 1.1 09-Jan-1997 lukem

* add a man page for the editline routines
* add a man page describing editrc
* fix bugs in el_parse():
* didn't execute command when program name matched (test reversed)
* was checking against empty string instead of program name
* after checks, command to run also pointed to empty string

[christos - the author of libedit - ok-ed the man pages in general (which I
wrote from scratch by RTFS) as well as the bugfix]