aboutsummaryrefslogtreecommitdiffstats
path: root/builtins/history.def
diff options
context:
space:
mode:
authorJari Aalto <jari.aalto@cante.net>1997-06-05 14:59:13 +0000
committerJari Aalto <jari.aalto@cante.net>2009-09-12 16:46:50 +0000
commitd166f048818e10cf3799aa24a174fb22835f1acc (patch)
tree1ca27f9243900f8b236d0cde6a3862002aea9e19 /builtins/history.def
parentccc6cda312fea9f0468ee65b8f368e9653e1380b (diff)
downloadandroid_external_bash-d166f048818e10cf3799aa24a174fb22835f1acc.tar.gz
android_external_bash-d166f048818e10cf3799aa24a174fb22835f1acc.tar.bz2
android_external_bash-d166f048818e10cf3799aa24a174fb22835f1acc.zip
Imported from ../bash-2.01.tar.gz.
Diffstat (limited to 'builtins/history.def')
-rw-r--r--builtins/history.def8
1 files changed, 4 insertions, 4 deletions
diff --git a/builtins/history.def b/builtins/history.def
index 939eb25..b1e3ab3 100644
--- a/builtins/history.def
+++ b/builtins/history.def
@@ -45,7 +45,7 @@ $END
#include <config.h>
#if defined (HISTORY)
-#include <sys/types.h>
+#include "../bashtypes.h"
#include <sys/file.h>
#include "../posixstat.h"
#include "../filecntl.h"
@@ -193,7 +193,7 @@ display_history (list)
if (list)
{
limited = 1;
- limit = get_numeric_arg (list);
+ limit = get_numeric_arg (list, 0);
}
else
limited = limit = 0;
@@ -259,7 +259,7 @@ push_history (list)
{
char *s;
- if (delete_last_history () == 0)
+ if (hist_last_line_added && delete_last_history () == 0)
return;
s = string_list (list);
maybe_add_history (s); /* Obeys HISTCONTROL setting. */
@@ -274,7 +274,7 @@ expand_and_print_history (list)
char *s;
int r, result;
- if (delete_last_history () == 0)
+ if (hist_last_line_added && delete_last_history () == 0)
return EXECUTION_FAILURE;
result = EXECUTION_SUCCESS;
while (list)