mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-17 15:01:40 +02:00
25671: non existing variable in typeset -p should cause status 1
This commit is contained in:
parent
06cc84ce84
commit
6951a1e0b2
3 changed files with 9 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2008-09-15 Peter Stephenson <pws@csr.com>
|
||||
|
||||
* 25671: Src/builtin.c, Test/B02typeset.ztst: non-existent
|
||||
variable in typeset -p should cause status 1.
|
||||
|
||||
2008-09-14 Clint Adams <clint@zsh.org>
|
||||
|
||||
* 25667: Src/Zle/complete.c: free mstr before returning from
|
||||
|
|
|
@ -2479,8 +2479,10 @@ bin_typeset(char *name, char **argv, Options ops, int func)
|
|||
if (OPT_ISSET(ops,'p')) {
|
||||
if (hn)
|
||||
printparamnode(hn, printflags);
|
||||
else
|
||||
else {
|
||||
zwarnnam(name, "no such variable: %s", asg->name);
|
||||
returnval = 1;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
if (!typeset_single(name, asg->name, (Param)hn,
|
||||
|
|
|
@ -449,7 +449,7 @@
|
|||
array=(foo bar)
|
||||
fn() { typeset -p array nonexistent; }
|
||||
fn
|
||||
0:declare -p shouldn't create scoped values
|
||||
1:declare -p shouldn't create scoped values
|
||||
>typeset -a array
|
||||
>array=(foo bar)
|
||||
?fn:typeset: no such variable: nonexistent
|
||||
|
|
Loading…
Reference in a new issue