Commit Graph

15 Commits

Author SHA1 Message Date
lukem 509864fa8f - 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.
1999-11-12 01:05:07 +00:00
lukem 8494e0e800 * in el_source():
- don't reopen fp if it was successfully opened in a previous check
	- use strlcpy()/strlcat() instead of snprintf() to build a pathname,
	  since the former are more portable to other systems than the latter
* whitespace fascism
1999-09-21 00:55:55 +00:00
simonb 1528b77539 More trailing white space. 1999-07-02 15:14:07 +00:00
christos a6d4afba22 delint 1998-12-12 20:08:21 +00:00
christos 5e435627f6 fix core-dump caused by maps not being initialized before tty is called. 1998-09-28 11:00:05 +00:00
lukem f87d250404 * 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.
1998-07-29 02:26:00 +00:00
christos ff2402b524 el_init takes a third stream argument and add el_beep. 1998-05-20 01:01:00 +00:00
christos c49189ae41 Small optimization. Don't call isatty() on every invocation of el_gets, but
remember if the tty setup failed... Also trim the input line of trailing \r's.
1997-12-20 19:15:50 +00:00
christos 54fac6850e Fix compiler warnings. 1997-07-06 18:25:21 +00:00
christos 753977f439 Handle properly the case where the last line in the sourced file does
not have a trailing '\n'. From Jeffrey C Honig.
1997-04-24 18:54:16 +00:00
christos eb54427340 Portability fixes:
__const		-> const
BADSIG		-> SIG_ERR
int flags	-> u_int flags
#if __STDC__	-> #ifdef __STDC__
1997-04-11 17:52:44 +00:00
christos 3ff63340c3 Fix potential stack overflow; from Keith Bostic. 1997-03-20 16:42:32 +00:00
lukem e69e9fbfa5 fix el_source() - a block needed braces around it (the indenting fooled me) 1997-01-17 01:03:33 +00:00
lukem 2543e3e651 RCSid police
editline first appeared in 4.4BSD not NetBSD1.0
1997-01-11 06:47:47 +00:00
cgd 6dc2f1db52 libedit! 1994-05-06 06:01:42 +00:00