Browse Source

Make special interpreter variable "noglob" behave as documented:

globbing is off by default.  An incompatible change, but previous
behaviour can be restored by "unset noglob" in .spiceinit.
pre-master-46
Giles Atkinson 3 years ago
committed by Holger Vogt
parent
commit
a70e708114
  1. 3
      src/frontend/parser/glob.c
  2. 2
      tests/regression/misc/dollar-1.cir
  3. 2
      tests/regression/misc/dollar-1.out

3
src/frontend/parser/glob.c

@ -86,6 +86,9 @@ static void tilde_expand_word(wordlist *wl_node);
* name of a "HOME" directory are supported. ?*[] are not */ * name of a "HOME" directory are supported. ?*[] are not */
wordlist *cp_doglob(wordlist *wlist) wordlist *cp_doglob(wordlist *wlist)
{ {
if (cp_noglob)
return wlist;
/* Expand {a,b,c} */ /* Expand {a,b,c} */
{ {
wordlist *wl = wlist; wordlist *wl = wlist;

2
tests/regression/misc/dollar-1.cir

@ -5,7 +5,7 @@ v1 1 0 dc = 0
.control .control
set foo = "" set foo = ""
echo "TEST:" ">{$foo}< should be ><"
echo "TEST:" ">{$foo}< should be >{}<"
set foo = ( 1 2 3 ) set foo = ( 1 2 3 )
set bar = 2 set bar = 2

2
tests/regression/misc/dollar-1.out

@ -1,7 +1,7 @@
Circuit: test for regression of already fixed bugs Circuit: test for regression of already fixed bugs
TEST: >< should be ><
TEST: >{}< should be >{}<
TEST: >1< should be >1< TEST: >1< should be >1<
TEST: >2< should be >2< TEST: >2< should be >2<
TEST: 1 2 3 baz bar TEST: 1 2 3 baz bar

Loading…
Cancel
Save