Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [bug] escaping spaces in _canonical_paths
- X-seq: zsh-workers 40827
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>, zsh-workers@xxxxxxx
- Subject: Re: [bug] escaping spaces in _canonical_paths
- Date: Fri, 10 Mar 2017 18:31:10 -0800
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version; bh=+ujGQwB+IPYi0oX7AC8R5EotgVt1Etrk+qradVf/QoY=; b=uIRLgUMgbA/I4tU6UQjNYRGnTL7dBD3kjbywuDylgV6IPTuvldIMxGKZRMrAy0fnpj FKCxBlzh0ZTziMHiPXDiZOfs3kmt5dWUoGc0lKXp9QynpzMZ1dKwR4RDucMebbyLM3Pi l/rAd9PIoZQshI+5YbOie3YcPIlcwO/ksmqObN5BB0et1GjWMESnHTPeuWjqC2lfZ5lL ytscbGiY73UzVxTIgI0W0pMVin6/XrhPzNqoWhHxiZL/vgb4v8J99xpi+5ZHy+AB764+ qAMaSZReC+VbZtR68oXyXkfVlWXREYQ0SB+qItTTA/oQ9Se0GBtA/VfeznqyhDpVtsYL 2yQA==
- In-reply-to: <20170310055342.GB4113@fujitsu.shahaf.local2>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <87a88yk32i.fsf@mure.haselwarter.org> <170309214820.ZM30638@torch.brasslantern.com> <20170310055342.GB4113@fujitsu.shahaf.local2>
On Mar 10, 5:53am, Daniel Shahaf wrote:
}
} Perhaps the abspath branch gets confused on mountpoint names that
} contain literal ' characters? Since the ${foo/bar/baz} replacement is
} done on the compadd results, and compadd wasn't called with -Q.
Indeed, I created a mount point named "aa'cc 2" and with the patch
from 40801, _canonical_paths is not able to complete that as an
absolute path if given a prefix.
It will correctly add the absolute path to the menu of completions if
there is no path prefix.
On a quick test the absolute-path case needs $PREFIX as-is, whereas
the local-directory case needs ${(Q)PREFIX}.
There's yet a third case -- a relative sub-directory, e.g.
% cd /
% sudo umount <TAB>
will show mnt/aa\'cc\ 2 in the list of completions, but
% sudo umount mnt<TAB>
will not complete anything, whereas both
% sudo umount /mnt/a<TAB>
and
% cd mnt
% sudo umount a<TAB>
correctly show a result.
There may be a bug with the :P modifier -- see other thread. With that
fixed, things are better, but still messed up when $compstate[quote] is
a substring of the mount point name (if you see what I mean).
Messages sorted by:
Reverse Date,
Date,
Thread,
Author