Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Path with spaces in _canonical_paths




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!

However, there is another weird behaviour that I just now noticed (but it's unrelated to this patch). When resolving relative paths from within a symlinked directory, it seems to assume the resolved path of the cwd as basepath. Maybe best explained by another example:

    # ln -s /usr/local/bin /mnt
    # ln -s /tmp /foo
    # cd /mnt
    # compdef '_canonical_paths -N files files /tmp/My\ File' cmd
    # cmd <Tab>
    ../../../foo/My\ File
    ../../../tmp/My\ File

Notice the amount of ../

Remains to be seen if it works ... I still can't figure out how to
cause that code path ("else") to be followed when I try to reproduce
Thomas's error.

Are you still not able to reproduce, even on the docker? How is that possible? Can it be different due to terminal? Doesn't really make sense to me.. Are you able to reproduce @Daniel?

Best, Thomas

Attachment: OpenPGP_0x39BEE2916D330138.asc
Description: OpenPGP public key

Attachment: OpenPGP_signature
Description: OpenPGP digital signature



Messages sorted by: Reverse Date, Date, Thread, Author