fix crash from compgen in a non-interactive shell; globstar option now works with complete -G; wait -p changes; some int->size_t changes

This commit is contained in:
Chet Ramey
2022-04-19 10:45:39 -04:00
parent 3be2a2ca9a
commit 7a8455e421
45 changed files with 7600 additions and 8195 deletions
+4 -2
View File
@@ -884,16 +884,18 @@ gen_action_completions (cs, text)
TEXT as a match prefix, or just go without? Currently, the code does not
use TEXT, just globs CS->globpat and returns the results. If we do decide
to use TEXT, we should call quote_string_for_globbing before the call to
glob_filename. */
glob_filename (in which case we could use shell_glob_filename). */
static STRINGLIST *
gen_globpat_matches (cs, text)
COMPSPEC *cs;
const char *text;
{
STRINGLIST *sl;
int gflags;
sl = strlist_create (0);
sl->list = glob_filename (cs->globpat, 0);
gflags = glob_star ? GX_GLOBSTAR : 0;
sl->list = glob_filename (cs->globpat, gflags);
if (GLOB_FAILED (sl->list))
sl->list = (char **)NULL;
if (sl->list)