Commit Graph

456 Commits

Author SHA1 Message Date
christos 6fbbcd94ce PR/42646: Joachim Kuebart: Shell crashes in libedit when window size changes
(SIGWINCH). Return NULL if el_gets() gets interrupted.
2010-01-20 01:15:52 +00:00
christos 654f9c04e7 Fix wrapper for EL_EDITOR, from Michael L. Hitch 2010-01-19 22:38:08 +00:00
christos 081c24c702 PR/42637: Joachim Kuebart: Shell tab completion crashes due to libedit stack
smashing
2010-01-18 19:17:42 +00:00
christos 139d3d5a3b - call the mapping function directly instead of el_wset().
- save the strings passed to the mapping function so that they don't get
  re-used. This leaks. To fix it properly we could either pass a flag to
  free particular entries before re-using, or allocate all of them.
  Allocating all of them wastes memory, allocating some of them makes
  the code more complex.
This fixes compatibility binding (shell tab completion for example)
2010-01-12 19:40:50 +00:00
christos c9043bbf6e - in the argv conversion, handle NULL as NULL
- when printing tab/nl print them, don't handle them specially.
2010-01-12 19:37:18 +00:00
wiz 0d3270a169 Bump date for historyw -> history_w. 2010-01-03 19:05:26 +00:00
christos 73eda9fe27 rename historyw -> history_w for consistency.
add wide tst code and make it the default.
2010-01-03 18:27:10 +00:00
christos 4168f34493 expose the encode and decode string functions for the benefit of history
and readline.
2009-12-31 18:32:37 +00:00
christos dc8498bec8 - Document and enable wide character support.
- Fix read function compatibility.
2009-12-31 15:58:26 +00:00
christos 0b9ae3fdf0 Fix wide build, test it, but don't turn it on yet. 2009-12-30 23:54:52 +00:00
christos 34e53048e6 Wide character support (UTF-8) from Johny Mattsson; currently disabled. 2009-12-30 22:37:40 +00:00
christos 8106943a02 reduce diff with tcsh 2009-12-28 22:15:36 +00:00
christos b90e7198e7 improve on the listing display by printing only one character after the
filename not two, and no trailing blanks. I will revisit this when I write
the ls-F code.
2009-12-28 21:55:38 +00:00
christos c8b67cd8d5 Reduce diff with tcsh's editor. No functional change intended. 2009-12-28 21:54:21 +00:00
christos 969676ec74 Fix bug where tab completion on the second or > line that caused listing
ended up corrupting the display by an extra space in the beginning. Reported
by Mac Chan.
2009-12-28 21:52:43 +00:00
christos ea3813ed2f apply apple patches from:
http://opensource.apple.com/source/libedit/libedit-11/patches/
2009-09-07 21:24:33 +00:00
christos 461d0372fd delete defined(sun), it could be invaded in the user namespace. Suggested
by mrg@
2009-08-31 00:05:43 +00:00
christos 5aa87ec494 use __sun || sun instead of _SunOS, from Jess Thrysoee 2009-08-30 15:41:05 +00:00
christos 085c78fd1f Ignore comment lines in .editrc from Jess Thrysoee 2009-07-25 21:19:23 +00:00
christos bafe66c2cc Only need path if we have issetugid... From Anon Ymous 2009-07-22 18:25:26 +00:00
christos e304eddfd2 Don't depend on side effects inside an assert
From Michael Cook mcook at bbn dot com
2009-07-22 15:58:09 +00:00
christos cfa16c6369 Fix memory leaks in error paths.
From Michael Cook mcook at bbn dot com
2009-07-22 15:57:40 +00:00
christos 83965485c1 Always initialize nread since it is an out param.
From Michael Cook mcook at bbn dot com
2009-07-22 15:57:00 +00:00
christos 17a17e3aeb Move filename to the scope it is being used.
From Michael Cook mcook at bbn dot com
2009-07-22 15:56:29 +00:00
christos cfb4e5f917 Simplify the code. No functional change. 2009-07-17 12:28:27 +00:00
christos e2d0108bb8 - off by one in the term.h case.
- make code more similar to tcsh (if we want to handle wide chars, this is
  needed; for now it is a no-op)
2009-07-17 12:27:57 +00:00
christos 59a88754a7 handle prompt_esc properly. 2009-07-17 12:26:26 +00:00
christos 537657ed45 Use the proper prompt printing function. 2009-07-17 12:25:52 +00:00
christos 8e714f4b6e add stdio.h since we are using FILE. From Grant Erickson 2009-07-09 19:02:04 +00:00
perry eb247ff739 note that the return value of el_gets doesn't remain valid across
calls.
2009-07-05 21:55:24 +00:00
christos 287bd18049 decrement the number of levels after the loop (Julien Torres) 2009-06-09 13:04:33 +00:00
christos e55354196b from Julien Torres, flip the order we pop in the macro array. 2009-06-08 15:10:53 +00:00
christos 189ce7898b always scroll when we advance past bottom. From Caleb Welton
cwelton at greenplum dot com
2009-05-19 21:45:14 +00:00
wiz 35cf287cb8 Punctuation nit. 2009-05-12 08:14:07 +00:00
christos b627b61f7f restore binary compatibility by providing new prompt functions that take
an extra literal character.
2009-05-11 18:33:30 +00:00
christos b203bfe74f PR/41230: -current: sh(1) endlessly looping in interactive
Fix proposed from Matthew Mondor
2009-04-16 19:39:37 +00:00
wiz 55a1b57943 Drop trailing whitespace. 2009-04-11 22:17:52 +00:00
joerg dab0ac3098 Don't use .Xo/.Xc to work around ancient macro argument limit in groff. 2009-04-11 20:53:15 +00:00
joerg 22ce33e2aa Don't use .Xo/.Xc to avoid ancient macro argument limit. 2009-04-11 20:48:26 +00:00
christos 46db7d011d Fix off by one error reported by: Caleb Welton cwelton at greenplum dot com 2009-04-08 21:31:31 +00:00
wiz 3a9e7e68ee Readability improvement. Whitespace nits. 2009-04-01 08:58:47 +00:00
christos 097860c04e cast to size_t to avoid sign / unsigned comparison warning. 2009-03-31 21:33:17 +00:00
christos e6ec3d065c implement RL_PROMPT_{START,END}_IGNORE 2009-03-31 17:53:03 +00:00
christos c8754a5b44 Implement literal prompt sequences. Now someone can implement
RL_PROMPT_START_LITERAL/RL_PROMPT_END_LITERAL :-)
2009-03-31 17:38:27 +00:00
wiz 097d2fd1a6 -1 is not a defined value, it is just a value.
On the other hand, minuses need backslashes, otherwise they become hyphens.
2009-03-10 22:55:14 +00:00
christos ae87843e53 make el_gets set the count to -1 on error to distinguish between EOF and
error.
2009-03-10 20:46:15 +00:00
joerg 997634fe14 Fix preamble to match order set out by mdoc(7). Discussed with wiz. 2009-03-09 19:24:26 +00:00
msaitoh 150e7551ec fix mis-evaluating whether a char is digit or not. 2009-02-27 04:18:45 +00:00
christos 07e886c39c remove VEOF test. the tty is in cooked mode when we are not editing and
the tty driver does the check for us.
2009-02-21 23:35:10 +00:00
christos 954af9bb67 more size_t stuff. 2009-02-21 23:31:56 +00:00