zsh-workers
 help / color / mirror / code / Atom feed
From: Hrvoje Niksic <hniksic@xemacs.org>
To: zsh-workers@sunsite.dk
Subject: Quoting in zsh -x output
Date: Sat, 03 Aug 2002 19:05:03 +0200	[thread overview]
Message-ID: <sxswur7ho00.fsf@florida.munich.redhat.com> (raw)

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.


             reply	other threads:[~2002-08-03 17:05 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-03 17:05 Hrvoje Niksic [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-07-30 16:26 Hrvoje Niksic
2002-07-30 17:03 ` Peter Stephenson
2002-07-30 20:50   ` Dan Nelson
2002-07-31  9:42     ` Peter Stephenson
2002-07-31 14:55       ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=sxswur7ho00.fsf@florida.munich.redhat.com \
    --to=hniksic@xemacs.org \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).