From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9375 invoked by alias); 15 Jan 2018 04:29:04 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: List-Unsubscribe: X-Seq: 42282 Received: (qmail 2113 invoked by uid 1010); 15 Jan 2018 04:29:04 -0000 X-Qmail-Scanner-Diagnostics: from mail-it0-f53.google.com 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(209.85.214.53):SA:0(-2.6/5.0):. Processed in 10.927322 secs); 15 Jan 2018 04:29:04 -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,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.1 X-Envelope-From: dana@dana.is X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dana-is.20150623.gappssmtp.com; s=20150623; h=from:content-transfer-encoding:mime-version:subject:message-id:date :to; bh=INtFB8fjlm1gfHIKBiK1xdNpG0EevRHAg+k9SgKndsM=; b=jd2iOb/dMvFjMHc5PEzLZp0j7TUVOvj3Ul+5FKj1c4KsEw82x26SiJSK6QW6+VRmP4 yjZZ853L7KnzZ5HlaU7EVBdUZuN507/A1UiGmStKF4Pi9YSQw4+Mbay2Qd/JUraecEFD dRtF/8rvldEjRWpXqPPZUwLZLc6+YRmpnTVeEBhrg+oBV8uOFTE9P6l7k2Zw7qmIyivc LBBLaFwHQd1cJ2DKJ8QFeZH5GL9j29ByW+auhEoCIS608vKLgEYHjQgEryNzwjg/d16l MiknLc+QKSDEB0u8pJVD8HVG9pSN3++rg4RN2jf0+z9BOtpS4gwGilnOBkO/o5SrWUSU p+vA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version :subject:message-id:date:to; bh=INtFB8fjlm1gfHIKBiK1xdNpG0EevRHAg+k9SgKndsM=; b=YuhAfiAAddLc3Sleovp2W0/n/pk/KTzZCh1v4kJ8k1hjgqcQmNlcxFQz5x7Chp5V6F S5/G9guaXBsWbPEgXKH86d2p0InbagKDkmjtypB0oa9UXkCFkxc6fCngV/X4uebXg0uN qHsZaanlhYmLwlWT7LwYQRCDlGYlPqXBGZmiz2YjiM7RXuUpWUiIQnoGHtcDsyOK0Pjq +IHGt+iBA3dNrP1Ac9eyeH0SBT4waeUe7IIuOdjW/ebs6rQY9IBqBRLW6TmhiDg5Ncg+ NpqfA6/eOlCaB6NRHn+hk9Qc0AhPbu0OU55P7Sc1d6/L4bi1lRu0/8R08qeDdJgTUSCj jTtA== X-Gm-Message-State: AKwxytcBHJP0ZMUB5fnomKZ3R9GYd/zkhoor6/UBD6nzMAZMtF5CE8uI JUo+2KWAfRHpefrdingBtuA2g/avLi8= X-Google-Smtp-Source: ACJfBosHDoldNy8e+g7UBQPHSFWNU/KhBC0Dz59zD+vckALwz9O1exCgBqV7z2xYQ9JoBnmULgIAuw== X-Received: by 10.36.76.68 with SMTP id a65mr12209498itb.57.1515990529699; Sun, 14 Jan 2018 20:28:49 -0800 (PST) From: dana Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: [PATCH] Make umount complete paths containing special characters as expected Message-Id: Date: Sun, 14 Jan 2018 22:28:48 -0600 To: zsh-workers@zsh.org X-Mailer: Apple Mail (2.3273) I noticed that, when trying to complete a mount point containing special characters (like spaces), the argument gets added to the command line = without any escaping: % mkdir 'dir with spaces' % sudo mount -t tmpfs{,} 'dir with spaces' % grep spaces /proc/mounts tmpfs /home/dana/dir\040with\040spaces tmpfs rw,relatime 0 0 % umount dir # yields `dir with spaces`, not `dir\ with\ spaces` The included patch seems to fix it, but i have to confess i'm not sure = what the other implications might be. There's no explanation provided with the = original commit or in the documentation as to why we would have wanted this = behaviour. Maybe someone could double-check my thinking. dana diff --git a/Completion/Unix/Type/_canonical_paths = b/Completion/Unix/Type/_canonical_paths index 6eab7b677..67377095f 100644 --- a/Completion/Unix/Type/_canonical_paths +++ b/Completion/Unix/Type/_canonical_paths @@ -113,7 +113,7 @@ _canonical_paths() { done fi =20 - _wanted "$tag" expl "$desc" compadd $__gopts -Q -U -a matches && = ret=3D0 + _wanted "$tag" expl "$desc" compadd $__gopts -U -a matches && ret=3D0 =20 return ret }