1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-16 12:21:18 +02:00

unlocalised variable

This commit is contained in:
Peter Stephenson 2008-06-30 13:07:45 +00:00
parent 950756d579
commit db59a707c6
2 changed files with 4 additions and 0 deletions

View file

@ -1,5 +1,8 @@
2008-06-30 Peter Stephenson <pws@csr.com>
* unposted: Functions/Calendar/calendar_scandate: unlocalised
variable spotted with warncreateglobal.
* 25255: Doc/Zsh/func.yo, Src/exec.c, Test/C04funcdef.ztst:
anonymous functions using "() { ... }" and "function { ... }".

View file

@ -267,6 +267,7 @@ fi
# We do this by minimal matching at the head, i.e. ${...#...}.
# To use a case statement we'd need to be able to request non-greedy
# matching for a pattern.
local rest
rest=${line#(#ibm)${~tspat}(<0-12>):(<0-59>)[.:]((<0-59>)(.<->|))[[:space:]]#([ap])(|.)[[:space:]]#m(.|[[:space:]]|(#e))}
if [[ $rest != $line ]]; then
hour=$match[2]