Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: mkdir builtin and $'\0'



Test for this.

It's difficult to test with prompts because we don't have control over
the date, so I've stuck with testing strftime.  It's the same interface,
except that any re-metafication is in the caller.

[Is there any future (not right now, obviously) in a shell variable that
overrides the date/time that's output, for debugging?  I can think of
cases where this would be really useful for debugging output from
scripts that include timestamps and you want to diff different
versions.  You could freeze the time to the same value, then run
both versions, and get a controlled difference.]

pws

diff --git a/Test/V09datetime.ztst b/Test/V09datetime.ztst
index 5c66055..c935199 100644
--- a/Test/V09datetime.ztst
+++ b/Test/V09datetime.ztst
@@ -65,3 +65,7 @@
 >   JANUARY
 >090
 >1
+
+  print ${(V)"$(strftime $'%Y\0%m\0%d' 100000000)"}
+0:Embedded nulls
+>1973^@03^@03



Messages sorted by: Reverse Date, Date, Thread, Author