From: Oliver Schmidhauser <oli@glow.li>
To: zsh-users@zsh.org
Subject: _mpc breaks when folder contains spaces
Date: Tue, 22 Aug 2017 13:12:29 +0200 [thread overview]
Message-ID: <20170822111229.GA28217@localhost> (raw)
Hi all!
I have a problem with mpc and the completion function.
mpc add Electronic/Las<tab>
mpc add Electronic/Laserkraft\ 3D/<tab>
mpc add Electronic/Laserkraft\ 3D/mpd error: No such directory
It seems to have a problem with the `\ ` in the path. It seems to be passed along to `mpc tab`, which it probably shouldn't.
I made a short video which demonstrates this problem: https://asciinema.org/a/vkNebrU6v5b9XYrMrdVeKpfB8
I've already raised this issue with mpc here: https://github.com/MusicPlayerDaemon/mpc/issues/7. The Maintainer of mpc made it very clear that the fault doesn't lie with mpc, but with zsh.
I've attached a .patch for _mpc which fixes this issue, as in it replaced `\ ` with ` ` before it is being passed to `mpc tab`. This probably doesn't fix the root of the issue, why `$word[CURRENT]` contains "Electronic/Laserkraft\ 3D" instead of "Electronic/Laserkraft 3D". It probably also breaks when a folder actually contains `\ `.
The second issue I have is `mpc tab` outputing errors while I am trying to autocomplete, breaking the current prompt so that I have to `Ctrl+C` and restart.
I've tested this with the minimal default config that generates when you run `zsh-newuser-install` and enable completion. I am running mpc 0.28 and zsh 5.4.1.
Thanks for any help,
glow
next reply other threads:[~2017-08-22 11:12 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-22 11:12 Oliver Schmidhauser [this message]
2017-08-22 15:57 ` Oliver Kiddle
2017-08-22 17:49 ` Oliver Schmidhauser
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170822111229.GA28217@localhost \
--to=oli@glow.li \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).