* zsh 3.1.9-dev-6: trace output filename problem with patch
@ 2000-09-14 4:37 E. Jay Berkenbilt
2000-09-14 5:12 ` Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: E. Jay Berkenbilt @ 2000-09-14 4:37 UTC (permalink / raw)
To: zsh-workers
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'
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: zsh 3.1.9-dev-6: trace output filename problem with patch
2000-09-14 4:37 zsh 3.1.9-dev-6: trace output filename problem with patch E. Jay Berkenbilt
@ 2000-09-14 5:12 ` Bart Schaefer
0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2000-09-14 5:12 UTC (permalink / raw)
To: E. Jay Berkenbilt, zsh-workers
On Sep 14, 12:37am, E. Jay Berkenbilt wrote:
}
} The problem: the \ in the filename needs to be quoted here but isn't.
I've committed this to sourceforge, except that I used ${(qq)tmp} because
I think the single-quoted form is more readable than the backslashed one.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2000-09-14 5:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-09-14 4:37 zsh 3.1.9-dev-6: trace output filename problem with patch E. Jay Berkenbilt
2000-09-14 5:12 ` Bart Schaefer
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).