Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Path with spaces in _canonical_paths
On Wed, Nov 23, 2022 at 3:36 PM Thomas Gläßle <thomas@xxxxxxxxxx> wrote:
>
> On 11/23/22 23:42, Bart Schaefer wrote:
> > + # ### The following approximates that.
> > + matches+=(${(q)${(M)files:#$canpref*}/$canpref/$origpref})
>
> Seems to resolve the issue!
Good!
> However, there is another weird behaviour that I just now noticed>
>
> # cmd <Tab>
> ../../../foo/My\ File
> ../../../tmp/My\ File
> When resolving relative paths from within
> a symlinked directory, it seems to assume the resolved path of the cwd
> as basepath.
Yes, there's a loop that walks up the tree if there's a path prefix on
the file being completed. How far up the tree it will look is
controlled by the canonical-paths-back-limit zstyle (default 8
levels). This is being exacerbated by the -N option because without
-N the :P modifier on the input paths would already have resolved the
symlinks.
Independently, I wonder if we should switch from :P to :A in the
not-dash-N case.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author