mirror of
https://git.freebsd.org/ports.git
synced 2025-07-08 12:59:17 -04:00
commands of the GNU readline package to any line-oriented Unix command. WWW: http://kaolin.unice.fr/Cle/ PR: ports/100855 Submitted by: Timothy Bourke <timbob at bigpond.com>
14 lines
425 B
C
14 lines
425 B
C
--- src/cle.c Sat Dec 4 00:41:14 1999
|
|
+++ src/cle.c Fri Mar 24 15:46:07 2006
|
|
@@ -147,8 +147,10 @@
|
|
rl_prep_terminal(_rl_meta_flag); /* Place the terminal in raw mode */
|
|
} else {
|
|
/* We are still in echo mode. Register the line in the history */
|
|
- add_history(s);
|
|
len= strlen(s);
|
|
+ if (len > 0) {
|
|
+ add_history(s);
|
|
+ }
|
|
s[len]= '\n';
|
|
write(fd, s, len+1);
|
|
}
|