From: Bart Schaefer <schaefer@brasslantern.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: Re: Problem with dir names containing spaces and parentheses
Date: Mon, 20 Mar 2017 22:31:15 -0700 [thread overview]
Message-ID: <170320223115.ZM31504@torch.brasslantern.com> (raw)
In-Reply-To: <CABZhJg8NLcYVcx23aAA9T+5UeaYMqWbNCpBvLsLKoGiZnTFPOg@mail.gmail.com>
This is another one where follow-ups probably ought to go to zsh-workers.
On Mar 20, 9:26pm, Jesper Nygards wrote:
}
} zstyle ':completion:*' path-completion false
This takes the code branch in _path_files that has this comment:
# Explanation of substitution: For tmp1 and tpre, which are used further
# on, we need to remove quotes from everything that's not a pattern
# character, because the code that does the file generation only
# strips quotes from pattern characters (you know better than
# to ask why).
A bit later this happens:
# Now put donepath back the way it should be. (I think.)
donepath=${tmp3//(#b)([\\\]\[\^\~\(\)\#\*\?])/\\$match[1]}
pre=$tpre
This fails to re-quote the space in $donepath and also sets $pre to
the empty string (i.e., $tpre is empty), which breaks any further file
matching in the directory (down around line 427 of _path-files, for
those attempting to follow the bouncing ball). That's not the only
thing that's going on -- I'm beginning to thing $tmp3 isn't even the
right thing to be assigning to donepath at that point -- but that's
a hint of how tangled up this is.
} I get the same result with this zstyle instead of the previous one (or with
} both together):
}
} zstyle ':completion:*' accept-exact true
Entirely different reason; here the "compfiles" builtin is failing. I
am not going to attempt to delve into that.
prev parent reply other threads:[~2017-03-21 5:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-20 20:26 Jesper Nygårds
2017-03-21 5:31 ` Bart Schaefer [this message]
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=170320223115.ZM31504@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-users@zsh.org \
/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).