From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27839 invoked by alias); 22 Aug 2017 11:12:42 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 22848 Received: (qmail 2717 invoked by uid 1010); 22 Aug 2017 11:12:42 -0000 X-Qmail-Scanner-Diagnostics: from zic-mail02.zic-network.ch by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(193.47.103.28):SA:0(-2.6/5.0):. Processed in 1.906519 secs); 22 Aug 2017 11:12:42 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: oli@glow.li X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Date: Tue, 22 Aug 2017 13:12:29 +0200 From: Oliver Schmidhauser To: zsh-users@zsh.org Subject: _mpc breaks when folder contains spaces Message-ID: <20170822111229.GA28217@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.8.3 (2017-05-23) Hi all! I have a problem with mpc and the completion function. mpc add Electronic/Las mpc add Electronic/Laserkraft\ 3D/ 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