From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3280 invoked from network); 3 Aug 2002 17:05:34 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 3 Aug 2002 17:05:34 -0000 Received: (qmail 24904 invoked by alias); 3 Aug 2002 17:05:25 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 17498 Received: (qmail 24893 invoked from network); 3 Aug 2002 17:05:24 -0000 Sender: hniksic@florida.munich.redhat.com To: zsh-workers@sunsite.dk Subject: Quoting in zsh -x output X-Attribution: Hrvoje X-Face: &{dT~)Pu6V<0y?>3p$;@vh\`C7xB~A0T-J%Og)J,@-1%q6Q+, gs<-9M#&`I8cJp2b1{vPE|~+JE+gx;a7%BG{}nY^ehK1"q#rG O,Rn1A_Cy%t]V=Brv7h Date: Sat, 03 Aug 2002 19:05:03 +0200 Message-ID: User-Agent: Gnus/5.090006 (Oort Gnus v0.06) XEmacs/21.4 (Common Lisp, i686-pc-linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Thanks for looking into this. Dan, you are correct in your conclusion that I didn't ask for the original quoting to be preserved, but only for quoting to be consistent. The examples I gave in fact confirmed that. I hope the patch will go in; thanks for writing it. Bart, I agree that this patch will not allow pasting of more complex syntactic constructs. But that's not the case in Bash either, and I'm not sure if it's even generally possible with -x. Being able to correctly copy one command is already (IMHO) a great thing. For example, I have a fairly complex script called `reencode' that accepts simple arguments and uses them to construct the complex command line with which to call the actual encode utility, `mencoder'. For debugging and educational purposes, it's useful to see what the script is doing. The way I did it is: set -x mencoder $foo_opts $bar_opts_maybe -o "$dest" "$source" ... set +x With this I get a `make'-like feature of seeing the commands that are being run. Full quoting of output brings this to the next level: it allows me to rerun the command manually, possibly after making a small adjustment to the options. `make' doesn't support this, but it's really neat and very easy to get used to. Again, thanks for implementing this.