Browse Source

Make the special "noglob" variable work. To preserve previous behaviour

change the default value from true to undefined (meaning false).
Also fix a misleading comment in glob.c.
pre-master-46
Giles Atkinson 3 years ago
committed by Holger Vogt
parent
commit
2790fd68bb
  1. 1
      src/frontend/cpitf.c
  2. 6
      src/frontend/parser/glob.c
  3. 2
      src/frontend/variable.c

1
src/frontend/cpitf.c

@ -180,7 +180,6 @@ ft_cpinit(void)
}
cp_vset("prompt", CP_STRING, buf);
cp_vset("noglob", CP_BOOL, &t);
cp_vset("brief", CP_BOOL, &t);
/* Make vectors from values in predefs[] for the current plot.

6
src/frontend/parser/glob.c

@ -79,11 +79,11 @@ static inline void strip_1st_char(wordlist *wl_node);
static void tilde_expand_word(wordlist *wl_node);
/* For each word, go through two steps: expand the {}'s, and then do ?*[]
* globbing in them. Sort after the second phase but not the first...
/* For each word, go through two steps: expand the {}'s, and then do
* tilde-expansion in them (not available of Windows).
*
* Globbing of arbitrary levels of brace nesting and tilde expansion to the
* name of a "HOME" directory are supported. ?*[] are not */
* name of a "HOME" directory are supported. File globbing (?*[]) is not */
wordlist *cp_doglob(wordlist *wlist)
{
if (cp_noglob)

2
src/frontend/variable.c

@ -19,7 +19,7 @@ Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
#include "variable.h"
bool cp_noglob = TRUE;
bool cp_noglob = FALSE;
bool cp_nonomatch = FALSE;
bool cp_noclobber = FALSE;
bool cp_ignoreeof = FALSE;

Loading…
Cancel
Save