zsh-workers
 help / color / mirror / code / Atom feed
From: "E. Jay Berkenbilt" <ejb@ql.org>
To: zsh-workers@sunsite.auc.dk
Subject: zsh 3.1.9-dev-6: trace output filename problem with patch
Date: Thu, 14 Sep 2000 00:37:51 -0400	[thread overview]
Message-ID: <200009140437.AAA02999@soup.ql.org> (raw)


When inserting the command to look at the trace output from ^X? in an
editor, zsh forgets to quote the filename.

  zsh% \ls^X?
  Trace output left in /tmp/zsh1708\ls1 (up-history to view)
  ...

  ^P

  emacsclient /tmp/zsh1708\ls1 ;: '\ls'

The problem: the \ in the filename needs to be quoted here but isn't.

The same things happens if there are other characters that require
quoting (such as *) in the first word.  When inserting the editor
command into the history in _complete_debug, can't zsh quote $tmp?
Here is my suggested fix, made from the installed
3.1.9-dev-6/functions directory:

--- _complete_debug.safe	Wed Sep 13 11:05:24 2000
+++ _complete_debug	Thu Sep 14 00:29:57 2000
@@ -18,7 +18,7 @@
 unsetopt xtrace
 
 [[ -t 3 ]] && {
-    print -sR "${VISUAL:-${EDITOR:-${PAGER:-more}}} $tmp ;: $w"
+    print -sR "${VISUAL:-${EDITOR:-${PAGER:-more}}} ${(q)tmp} ;: $w"
     _message -r "Trace output left in $tmp (up-history to view)"
     [[ $compstate[nmatches] -le 1 && $compstate[list] != *force* ]] &&
         compstate[list]='list force messages'


             reply	other threads:[~2000-09-14  4:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-09-14  4:37 E. Jay Berkenbilt [this message]
2000-09-14  5:12 ` 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=200009140437.AAA02999@soup.ql.org \
    --to=ejb@ql.org \
    --cc=zsh-workers@sunsite.auc.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).