projects
/
platform
/
upstream
/
bash.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Imported from ../bash-2.01.tar.gz.
[platform/upstream/bash.git]
/
builtins
/
history.def
diff --git
a/builtins/history.def
b/builtins/history.def
index
939eb25
..
b1e3ab3
100644
(file)
--- a/
builtins/history.def
+++ b/
builtins/history.def
@@
-45,7
+45,7
@@
$END
#include <config.h>
#if defined (HISTORY)
#include <config.h>
#if defined (HISTORY)
-#include
<sys/types.h>
+#include
"../bashtypes.h"
#include <sys/file.h>
#include "../posixstat.h"
#include "../filecntl.h"
#include <sys/file.h>
#include "../posixstat.h"
#include "../filecntl.h"
@@
-193,7
+193,7
@@
display_history (list)
if (list)
{
limited = 1;
if (list)
{
limited = 1;
- limit = get_numeric_arg (list);
+ limit = get_numeric_arg (list
, 0
);
}
else
limited = limit = 0;
}
else
limited = limit = 0;
@@
-259,7
+259,7
@@
push_history (list)
{
char *s;
{
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. */
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;
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)
return EXECUTION_FAILURE;
result = EXECUTION_SUCCESS;
while (list)