Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Path with spaces in _canonical_paths
- X-seq: zsh-workers 51050
- From: Thomas Gläßle <thomas@xxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- Cc: zsh-workers@xxxxxxx
- Subject: Re: Path with spaces in _canonical_paths
- Date: Thu, 24 Nov 2022 00:36:09 +0100
- Archived-at: <https://zsh.org/workers/51050>
- In-reply-to: <CAH+w=7Z9wVCAeJaU+K-wG2jx8LHvUsF9aahUrAPLvMgaLW0STQ@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <sympa.1668791373.628329.85325.773@zsh.org> <CAH+w=7ZBYX3-X2AD_iDR6T4Yz8OdA1TE+YeC2qZmHdk+W=VbgA@mail.gmail.com> <cd447ee7-d991-a4fd-c155-ca1b6bb96d72@coldfix.de> <CAH+w=7ZHODk-ZKPLvXiyd6s17uO+fnC-vgxnHvyGnnrqzr7vrQ@mail.gmail.com> <45820bd7-fab6-70f5-5abb-dc444f6f1075@coldfix.de> <CAH+w=7a1_O7nBO4jUH2otCnjvcW+tJmzPHqm_Zw+CVJtM_PyJw@mail.gmail.com> <20221123141357.GL27622@tarpaulin.shahaf.local2> <CAH+w=7ZOw2kKzVy3CwqgQEgZRX8agxic1VQqh4mB642ayKz0aQ@mail.gmail.com> <aa2462d2-468f-4b76-a36d-35a08dc975a9@app.fastmail.com> <CAH+w=7Z9wVCAeJaU+K-wG2jx8LHvUsF9aahUrAPLvMgaLW0STQ@mail.gmail.com>
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