From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19236 invoked by alias); 19 Aug 2015 10:03:03 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 36241 Received: (qmail 16820 invoked from network); 19 Aug 2015 10:03:02 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 X-AuditID: cbfec7f4-f79c56d0000012ee-0a-55d451f6764b Date: Wed, 19 Aug 2015 10:52:50 +0100 From: Peter Stephenson To: Zsh hackers list Subject: Re: mkdir builtin and $'\0' Message-id: <20150819105250.00b56bb3@pwslap01u.europe.root.pri> In-reply-to: <20150818152145.6ae8dc32@pwslap01u.europe.root.pri> References: <20150818091904.GA5389@chaz.gmail.com> <20150818104911.034b6705@pwslap01u.europe.root.pri> <20150818111134.GA5629@chaz.gmail.com> <20150818122755.39fe78c8@pwslap01u.europe.root.pri> <20150818125519.GB5629@chaz.gmail.com> <20150818142458.3252389e@pwslap01u.europe.root.pri> <20150818152145.6ae8dc32@pwslap01u.europe.root.pri> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrCLMWRmVeSWpSXmKPExsVy+t/xq7rfAq+EGsy9ymNxsPkhkwOjx6qD H5gCGKO4bFJSczLLUov07RK4MqZu/MlU0MFe0b7HvYHxAWsXIyeHhICJxOz78xghbDGJC/fW s3UxcnEICSxllOi/upkdwpnBJHFkyXwoZxujxPlvM5hAWlgEVCWu9DwGa2cTMJSYumk2mC0i oCWx4+RJsBphARWJl40dbCA2r4C9RMf09WA2p4CDRNvP9UwQQ+8wSSy61Ah2E7+AvsTVv5+Y IG6yl5h55QwjRLOgxI/J91hAbGagBZu3NbFC2PISm9e8ZQaxhQTUJW7c3c0+gVFoFpKWWUha ZiFpWcDIvIpRNLU0uaA4KT3XUK84Mbe4NC9dLzk/dxMjJGy/7GBcfMzqEKMAB6MSD++MbZdD hVgTy4orcw8xSnAwK4nw8ppfCRXiTUmsrEotyo8vKs1JLT7EKM3BoiTOO3fX+xAhgfTEktTs 1NSC1CKYLBMHp1QDY02p5yZJmUmrN6/YG1O8/PKriWt5Qm8z9BW6pltLKpk/qpZ9Pece/9yK iwnWlza/tNo/SXO9QUeaommTwsqt7dPu3mfJdjpnY/y4ojN53WbGBy+Z+fdbVe2/p/fgk6Dh g9KyOA7RdxrLDKfxqGype3l8a5s5X+Sf9RZlF7Ivy7mFzkgMi/r5S4mlOCPRUIu5qDgRACTV 6yJXAgAA 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