Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Path with spaces in _canonical_paths
- X-seq: zsh-workers 51053
- From: Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Cc: Thomas Gläßle <thomas@xxxxxxxxxx>
- Subject: Re: Path with spaces in _canonical_paths
- Date: Thu, 24 Nov 2022 00:12:56 +0000
- Archived-at: <https://zsh.org/workers/51053>
- Feedback-id: i425e4195:Fastmail
- In-reply-to: <CAH+w=7bUUbPfSKVgk+7+1PPvQYQ2OPwDakuz2Ps=4agOYk=hsQ@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <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> <2c4018af-1fe8-4e23-a31b-11158061bd18@app.fastmail.com> <CAH+w=7bUUbPfSKVgk+7+1PPvQYQ2OPwDakuz2Ps=4agOYk=hsQ@mail.gmail.com>
Bart Schaefer wrote on Wed, Nov 23, 2022 at 15:12:40 -0800:
> On Wed, Nov 23, 2022 at 3:06 PM Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> > Anyway, I see you've extended it to clarify. Thanks for this.
>
> 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.
In the zsh tree,
.
_f() { _canonical_paths tag desc $PWD/README }
compdef _f f
f <TAB>
.
is enough for me to get the else path to be taken. For the variant with
-N and quoting,
.
touch /tmp/My\ File
ln -s /tmp slashtmp
compdef '_canonical_paths -N files files /tmp/My\ File' cmd
cmd <TAB>
.
gives
.
1 >>> files
2 /tmp/My\ File slashtmp/My File
That's with current HEAD and my nearly-minimal test setup (sets
little besides 'format', 'group-name', $PS1, $PS4, and $fpath).
Cheers,
Daniel
Messages sorted by:
Reverse Date,
Date,
Thread,
Author