diff --git a/check.t b/check.t index 9af588d..465c138 100644 --- a/check.t +++ b/check.t @@ -1,4 +1,4 @@ -# $MirOS: src/bin/mksh/check.t,v 1.231 2008/10/15 10:24:59 tg Exp $ +# $MirOS: src/bin/mksh/check.t,v 1.232 2008/10/19 20:15:42 tg Exp $ # $OpenBSD: bksl-nl.t,v 1.2 2001/01/28 23:04:56 niklas Exp $ # $OpenBSD: history.t,v 1.5 2001/01/28 23:04:56 niklas Exp $ # $OpenBSD: read.t,v 1.3 2003/03/10 03:48:16 david Exp $ @@ -7,7 +7,7 @@ # http://www.research.att.com/~gsf/public/ifs.sh expected-stdout: - @(#)MIRBSD KSH R35 2008/10/15 + @(#)MIRBSD KSH R35 2008/10/19 description: Check version of shell. stdin: diff --git a/edit.c b/edit.c index e8008d6..990a96c 100644 --- a/edit.c +++ b/edit.c @@ -5,7 +5,7 @@ #include "sh.h" -__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.138 2008/10/13 23:06:02 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/edit.c,v 1.139 2008/10/19 20:15:43 tg Exp $"); /* tty driver characters we are interested in */ typedef struct { @@ -2202,6 +2202,10 @@ x_search_hist(int c) } } offset = x_search(pat, 0, offset); + } else if (f == XFUNC_abort) { + if (offset >= 0) + x_load_hist(histptr + 1); + break; } else { /* other command */ x_e_ungetc(c); break; diff --git a/mksh.1 b/mksh.1 index fc0ac88..fb16734 100644 --- a/mksh.1 +++ b/mksh.1 @@ -1,4 +1,4 @@ -.\" $MirOS: src/bin/mksh/mksh.1,v 1.140 2008/10/04 23:22:13 tg Exp $ +.\" $MirOS: src/bin/mksh/mksh.1,v 1.141 2008/10/19 20:15:44 tg Exp $ .\" $OpenBSD: ksh.1,v 1.122 2008/05/17 23:31:52 sobrado Exp $ .\"- .\" Try to make GNU groff and AT&T nroff more compatible @@ -30,7 +30,7 @@ .el .xD \\$1 \\$2 \\$3 \\$4 \\$5 \\$6 \\$7 \\$8 .. .\"- -.Dd $Mdocdate: October 4 2008 $ +.Dd $Mdocdate: October 19 2008 $ .Dt MKSH 1 .Os MirBSD .Sh NAME @@ -4840,6 +4840,9 @@ followed by a or .Ic prefix\-2 key will be executed after leaving search mode. +The +.Ic abort Pq \*(haG +command will restore the input line before search started. Successive .Ic search\-history commands continue searching backward to the next previous occurrence of the diff --git a/sh.h b/sh.h index 0652e58..11ee1dc 100644 --- a/sh.h +++ b/sh.h @@ -100,9 +100,9 @@ #define __SCCSID(x) __IDSTRING(sccsid,x) #ifdef EXTERN -__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.241 2008/10/15 10:25:01 tg Exp $"); +__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.242 2008/10/19 20:15:45 tg Exp $"); #endif -#define MKSH_VERSION "R35 2008/10/15" +#define MKSH_VERSION "R35 2008/10/19" #ifndef MKSH_INCLUDES_ONLY