sh: fix NO_HISTORY build
Move code added inb315a7296d
("autocomplete commands") to conditionally compiled part under #ifndef NO_HISTORY. Reported by: bdrewery Fixes:b315a7296d
This commit is contained in:
parent
eba8e643b1
commit
35b253d9d2
@ -565,27 +565,6 @@ bindcmd(int argc, char **argv)
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#else
|
|
||||||
#include "error.h"
|
|
||||||
|
|
||||||
int
|
|
||||||
histcmd(int argc __unused, char **argv __unused)
|
|
||||||
{
|
|
||||||
|
|
||||||
error("not compiled with history support");
|
|
||||||
/*NOTREACHED*/
|
|
||||||
return (0);
|
|
||||||
}
|
|
||||||
|
|
||||||
int
|
|
||||||
bindcmd(int argc __unused, char **argv __unused)
|
|
||||||
{
|
|
||||||
|
|
||||||
error("not compiled with line editing support");
|
|
||||||
return (0);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Comparator function for qsort(). The use of curpos here is to skip
|
* Comparator function for qsort(). The use of curpos here is to skip
|
||||||
* characters that we already know to compare equal (common prefix).
|
* characters that we already know to compare equal (common prefix).
|
||||||
@ -706,3 +685,24 @@ sh_complete(EditLine *sel, int ch __unused)
|
|||||||
L" \t\n\"\\'`@$><=;|&{(", NULL, NULL, (size_t)100,
|
L" \t\n\"\\'`@$><=;|&{(", NULL, NULL, (size_t)100,
|
||||||
NULL, &((int) {0}), NULL, NULL, FN_QUOTE_MATCH);
|
NULL, &((int) {0}), NULL, NULL, FN_QUOTE_MATCH);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#else
|
||||||
|
#include "error.h"
|
||||||
|
|
||||||
|
int
|
||||||
|
histcmd(int argc __unused, char **argv __unused)
|
||||||
|
{
|
||||||
|
|
||||||
|
error("not compiled with history support");
|
||||||
|
/*NOTREACHED*/
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
|
||||||
|
int
|
||||||
|
bindcmd(int argc __unused, char **argv __unused)
|
||||||
|
{
|
||||||
|
|
||||||
|
error("not compiled with line editing support");
|
||||||
|
return (0);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user