diff options
author | Oliver Kiddle <opk@zsh.org> | 2016-09-16 00:00:28 +0200 |
---|---|---|
committer | Oliver Kiddle <opk@zsh.org> | 2016-09-16 00:00:28 +0200 |
commit | fbafc5b509e311efee064bbd12396a2e207f3393 (patch) | |
tree | 9fdf8f236fb1d25b54079e81cf75bf05eeca0b26 /Src/parse.c | |
parent | 00708285e94ce42a31fd59bbcd06d010a6d0d6ee (diff) | |
download | zsh-fbafc5b509e311efee064bbd12396a2e207f3393.tar.gz zsh-fbafc5b509e311efee064bbd12396a2e207f3393.tar.xz zsh-fbafc5b509e311efee064bbd12396a2e207f3393.zip |
39332: support ksh's [[ -v varname ]] condition for checking if variables are set
Diffstat (limited to 'Src/parse.c')
-rw-r--r-- | Src/parse.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/parse.c b/Src/parse.c index d3c418184..24b8cd97f 100644 --- a/Src/parse.c +++ b/Src/parse.c @@ -2385,7 +2385,7 @@ par_cond_2(void) s1 = tokstr; dble = (s1 && *s1 == '-' && (!n_testargs - || strspn(s1+1, "abcdefghknoprstuwxzLONGS") == 1) + || strspn(s1+1, "abcdefghknoprstuvwxzLONGS") == 1) && !s1[2]); if (tok != STRING) { /* Check first argument for [[ STRING ]] re-interpretation */ @@ -2464,7 +2464,7 @@ par_cond_double(char *a, char *b) { if (a[0] != '-' || !a[1]) COND_ERROR("parse error: condition expected: %s", a); - else if (!a[2] && strspn(a+1, "abcdefgknoprstuwxzhLONGS") == 1) { + else if (!a[2] && strspn(a+1, "abcdefgknoprstuvwxzhLONGS") == 1) { ecadd(WCB_COND(a[1], 0)); ecstr(b); } else { |