SOURCES: poldek-cli-hist.patch (NEW) - preserve trailing whitespac...
glen
glen at pld-linux.org
Thu May 11 13:54:07 CEST 2006
Author: glen Date: Thu May 11 11:54:07 2006 GMT
Module: SOURCES Tag: HEAD
---- Log message:
- preserve trailing whitespaces in history (#5777)
---- Files affected:
SOURCES:
poldek-cli-hist.patch (NONE -> 1.1) (NEW)
---- Diffs:
================================================================
Index: SOURCES/poldek-cli-hist.patch
diff -u /dev/null SOURCES/poldek-cli-hist.patch:1.1
--- /dev/null Thu May 11 13:54:07 2006
+++ SOURCES/poldek-cli-hist.patch Thu May 11 13:54:01 2006
@@ -0,0 +1,54 @@
+===================================================================
+RCS file: /cvsroot/poldek/poldek/cli/shell.c,v
+retrieving revision 1.28
+retrieving revision 1.29
+diff -u -r1.28 -r1.29
+--- poldek/poldek/cli/shell.c 2006/01/07 01:06:48 1.28
++++ poldek/poldek/cli/shell.c 2006/05/11 09:51:53 1.29
+@@ -11,7 +11,7 @@
+ */
+
+ /*
+- $Id$
++ $Id$
+ */
+
+ #ifdef HAVE_CONFIG_H
+@@ -356,22 +356,34 @@
+ snprintf(prompt, sizeof(prompt), "poldek:%s%s> ",
+ currdir == NULL ? "/" : *currdir->name == '/' ? "" : "/",
+ currdir == NULL ? "" : currdir->name);
++
+ if ((line = readline(prompt)) == NULL)
+ break;
+
++ /* add to history? */
++ s = line;
++ while (isspace(*s))
++ s++;
++
++ if (*s)
++ add_history(line);
++
+ s = n_str_strip_ws(line);
+ if (*s) {
+ int _verbose = poldek_verbose();
+- add_history(s);
+- //print_mem_info("BEFORE");
++
+ shInCmd = 1;
+ DBGF("(%s)\n", s);
++
++ MEMINF("BEFORE %s\n", s);
+ poclidek_execline(cctx, NULL, s);
++ MEMINF("AFTER %s\n", s);
++
+ sigint_reset();
+ shDone = 0;
+ shInCmd = 0;
++
+ poldek_set_verbose(_verbose);
+- //print_mem_info("AFTER ");
+ }
+ free(line);
+
================================================================
More information about the pld-cvs-commit
mailing list