zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@brasslantern.com>
To: Frank v Waveren <fvw@var.cx>, zsh-workers@sunsite.dk
Subject: Re: zcompsys space character problem
Date: Tue, 5 Nov 2002 05:10:03 +0000	[thread overview]
Message-ID: <1021105051003.ZM21024@candle.brasslantern.com> (raw)
In-Reply-To: <1036465301GKC.fvw@jareth.var.cx>

This has something to do with `compfiles'.  Comparing the _complete_debug
output for `ls a\ a/f' vs. `ls aa/f' shows (they're the same up to line
461 of _path_files):

: _path_files:461:for while; compfiles -r tmp1 a\ a/f
: _path_files:462:for while; tmp4=1 
: _path_files:464:for while if; [[ a\ a/f == */* ]]
: _path_files:465:for while then; tmp2=a\ a 
: _path_files:466:for while then; PREFIX=a\ a 
: _path_files:467:for while then; SUFFIX=/f 
: _path_files:478:for while if; ((  tmp4  ))
: _path_files:486:for while then; tmp2= 
: _path_files:487:for while then if; [[ -n  ]]
: _path_files:489:for while then elif; [[ -n  ]]
: _path_files:493:for while then else; compquote tmp1 tmp2

			: _path_files:461:for while; compfiles -r tmp1 aa/f
			: _path_files:462:for while; tmp4=0 
			: _path_files:464:for while if; [[ aa/f == */* ]]
			: _path_files:465:for while then; tmp2=aa 
			: _path_files:466:for while then; PREFIX=aa 
			: _path_files:467:for while then; SUFFIX=/f 
			: _path_files:478:for while if; ((  tmp4  ))
			: _path_files:562:for while if; [[ aa/f != */* ]]
			: _path_files:570:for while; testpath=aa/ 
			: _path_files:572:for while; tmp3=f 

Note how the code branches differently at line 478 because `compfiles'
fails at line 461 in the case with the space.

Changing line 461 from

	compfiles -r tmp1 "$tmp3"

to

	compfiles -r tmp1 "${(Q)tmp3}"

has the desired effect in this particular case, but I don't know if it is
always correct.  Sven, are you out there?

-- 
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   


  reply	other threads:[~2002-11-05  5:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-11-05  3:27 Frank v Waveren
2002-11-05  5:10 ` Bart Schaefer [this message]
2002-11-05 12:36   ` Sven Wischnowsky
2002-11-06  8:03   ` Sven Wischnowsky

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=1021105051003.ZM21024@candle.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=fvw@var.cx \
    --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).