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.
This commit is contained in:
parent
a70e708114
commit
2790fd68bb
|
|
@ -180,7 +180,6 @@ ft_cpinit(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
cp_vset("prompt", CP_STRING, buf);
|
cp_vset("prompt", CP_STRING, buf);
|
||||||
cp_vset("noglob", CP_BOOL, &t);
|
|
||||||
cp_vset("brief", CP_BOOL, &t);
|
cp_vset("brief", CP_BOOL, &t);
|
||||||
|
|
||||||
/* Make vectors from values in predefs[] for the current plot.
|
/* Make vectors from values in predefs[] for the current plot.
|
||||||
|
|
|
||||||
|
|
@ -79,11 +79,11 @@ static inline void strip_1st_char(wordlist *wl_node);
|
||||||
static void tilde_expand_word(wordlist *wl_node);
|
static void tilde_expand_word(wordlist *wl_node);
|
||||||
|
|
||||||
|
|
||||||
/* For each word, go through two steps: expand the {}'s, and then do ?*[]
|
/* 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...
|
* tilde-expansion in them (not available of Windows).
|
||||||
*
|
*
|
||||||
* Globbing of arbitrary levels of brace nesting and tilde expansion to the
|
* 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)
|
wordlist *cp_doglob(wordlist *wlist)
|
||||||
{
|
{
|
||||||
if (cp_noglob)
|
if (cp_noglob)
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ Author: 1985 Wayne A. Christopher, U. C. Berkeley CAD Group
|
||||||
#include "variable.h"
|
#include "variable.h"
|
||||||
|
|
||||||
|
|
||||||
bool cp_noglob = TRUE;
|
bool cp_noglob = FALSE;
|
||||||
bool cp_nonomatch = FALSE;
|
bool cp_nonomatch = FALSE;
|
||||||
bool cp_noclobber = FALSE;
|
bool cp_noclobber = FALSE;
|
||||||
bool cp_ignoreeof = FALSE;
|
bool cp_ignoreeof = FALSE;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue