From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16625 invoked by alias); 1 Nov 2014 20:51:53 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 19304 Received: (qmail 22254 invoked from network); 1 Nov 2014 20:51:50 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Authority-Analysis: v=2.1 cv=AduIQRnG c=1 sm=1 tr=0 a=WX1zAfUMD62odRRZjfQOeg==:117 a=WX1zAfUMD62odRRZjfQOeg==:17 a=gmhVCtT3eHoA:10 a=N659UExz7-8A:10 a=6sgqe-4dUGeWuXNBsbsA:9 a=pILNOxqGKmIA:10 Message-id: <54554194.80109@eastlink.ca> Date: Sat, 01 Nov 2014 13:24:52 -0700 From: Ray Andrews User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.1.2 MIME-version: 1.0 To: zsh-users@zsh.org Subject: Re: first adventures References: <544D2D6F.8030505@eastlink.ca> <20141026175257.2611487b@pws-pc.ntlworld.com> <544FD6DD.7010806@eastlink.ca> <141028210510.ZM10784@torch.brasslantern.com> <54510A96.20009@eastlink.ca> <141029134624.ZM15681@torch.brasslantern.com> <545178DF.1040600@eastlink.ca> <141029210738.ZM15833@torch.brasslantern.com> <5452ED18.7070208@eastlink.ca> <141030195906.ZM30057@torch.brasslantern.com> <5453D0AE.6020705@eastlink.ca> <20141031195903.167d3e05@pws-pc.ntlworld.com> <545460D9.2090804@eastlink.ca> <54550BE5.6080602@eastlink.ca> <20141101184028.0737142d@pws-pc.ntlworld.com> In-reply-to: <20141101184028.0737142d@pws-pc.ntlworld.com> Content-type: text/plain; charset=windows-1252; format=flowed Content-transfer-encoding: 7bit On 11/01/2014 11:40 AM, Peter Stephenson wrote: This isn't fair in this case. The character \ was picked to be a special character because it isn't commonly used in normal text. So it's special to the command line. You now need it to be special somewhere else *as well*, at a later stage, for something that also picked the backslash to be special for exactly the same reason. It's not surprising that takes a bit of doing. Yeah, I see that. Still, all those {( ) .... processors are arbitrary, tho useful, tools. One could, I suppose create new ones to do whatever one wanted, including stripping quotation marks while leaving the 'special' backslash pairs. But I understand the logic of (Q) now, and I'm happy with (z) anyway because quoted strings are naturally single arguments, and (z) leaves ' \n ' alone. But my thinking is anticipated by the ' -r ' switch, which recognizes the specialness of the ' \n ' family of escapes, so one could imagine other parts of the shell recognizing that, too. It would just 'harmonize' what print and read and echo do with what the shell itself might be able to provide, namely special treatment for \n \t \b , etc. if requested. > With your analogy, you're trying to put a coffee bean into a roaster and > saying that you want it to emerge unscathed in such a way that it can be roast by > something else after it emerges. I'd rather say that I'd like to be able look at the bean before it's roasted at all. Anyway, TRAPDEBUG seems to do exactly that, so my itch is scratched. > > If you want text not to be processed by the shell, the best way of doing > that is to pass it via standard input and output rather than the command > line, using "read -r" and "print -r". Can you give me an example of that, please? > pws >