diff options
author | tjr <tjr@FreeBSD.org> | 2002-07-23 11:50:53 +0000 |
---|---|---|
committer | tjr <tjr@FreeBSD.org> | 2002-07-23 11:50:53 +0000 |
commit | f9fd5faa32d9a7f2b556f323090c9b6f2489ab61 (patch) | |
tree | 30084fb3c5e19f62d3064bce8b107128e70ca226 /bin/sh/histedit.c | |
parent | 1419e21345a70f2237a1608b56aaa25d89e8c496 (diff) | |
download | FreeBSD-src-f9fd5faa32d9a7f2b556f323090c9b6f2489ab61.zip FreeBSD-src-f9fd5faa32d9a7f2b556f323090c9b6f2489ab61.tar.gz |
Add a `bind' builtin command, which is simply a wrapper around libedit's
builtin command of the same name. This allows the key bindings for the
shell's line editor to be changed.
MFC after: 2 weeks
Diffstat (limited to 'bin/sh/histedit.c')
-rw-r--r-- | bin/sh/histedit.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/bin/sh/histedit.c b/bin/sh/histedit.c index 37a10bf..ae39c0b 100644 --- a/bin/sh/histedit.c +++ b/bin/sh/histedit.c @@ -480,6 +480,16 @@ str_to_event(char *str, int last) } return (he.num); } + +int +bindcmd(int argc, char **argv) +{ + + if (el == NULL) + error("line editing is disabled"); + return (el_parse(el, argc, argv)); +} + #else #include "error.h" @@ -491,4 +501,12 @@ histcmd(int argc, char **argv) /*NOTREACHED*/ return (0); } + +int +bindcmd(int argc, char **argv) +{ + + error("not compiled with line editing support"); + return (0); +} #endif |