From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28747 invoked by alias); 14 Dec 2014 15:18:47 -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: X-Seq: 33963 Received: (qmail 11067 invoked from network); 14 Dec 2014 15:18:46 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id; bh=g3VoizU4wmxzaHjxGiWYVyZPPIUE357lg1oIjInaR4Y=; b=0aus0R/o6oLVoriyOKro5Aa/xoGN0yXQ9wQquRnu6zW73l9wLhKruMoLAPRcNmixQE YzIucCtomhAfo3M4EFIJAPivDvGZ8Vw1YA/DGwXtXNl66Gvjou8d7ozuMfjsnRxGAyrn tExm2c6s8RsZBfe9IHgKFoZ8k4Vydlc3erK3L+YD1XuM6SDWlegucEGrWHRJFbRS/GPH 9Ra42EQBt2rJIodZACy4c9QP/qgnyd1rd5jjYCSmVXOzPYNaLNgjrlsVLGgvvoLBnKJj te3+J4RJvaPWmtHIP8zlFM5r1PW/y6RgqESSvXaQPbCI2vuv1PmyVoCAsmW1awpCT/Vy FUzA== X-Received: by 10.112.141.233 with SMTP id rr9mr25807853lbb.1.1418570322253; Sun, 14 Dec 2014 07:18:42 -0800 (PST) From: Mikael Magnusson To: zsh-workers@zsh.org Subject: PATCH: remove work of art in _umount Date: Sun, 14 Dec 2014 16:18:34 +0100 Message-Id: <1418570314-26371-1-git-send-email-mikachu@gmail.com> X-Mailer: git-send-email 2.2.0.GIT dpath_tmp could actually also have \040 in it, so also handle that. (for example if you bindmount /tmp/foo\ bar to /tmp/foo\ foo, both would). dev_tmp hopefully never will, but why not handle it anyway (if it should even be completed at this point at all). --- This doesn't in any way affect Silas' issue, but I spotted it while looking at the completer. --- Completion/Unix/Command/_mount | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/Completion/Unix/Command/_mount b/Completion/Unix/Command/_mount index 0428222..a3b58bb 100644 --- a/Completion/Unix/Command/_mount +++ b/Completion/Unix/Command/_mount @@ -959,27 +959,9 @@ udevordir) esac local MATCH MBEGIN MEND - # "Mummy, why is mount point matching full of squiggles?" - # - # "Well, dear, the clever people who wrote Linux decided that some - # funny characters that might confuse programmes looking at the names - # would be encoded as octal escapes, like for example \040 for space. - # The clever people who wrote zsh decided that nothing would - # ever be quite as simple as it should be, so to substitute octal - # escapes everywhere in a string, even though the shell understands - # them natively in print escapes, needs some hackery where you match - # the octal number using the numeric closure syntax introduced after - # 4.3.4, then reinput the number in a standard math mode format as 8#OOO, - # and turn that into a character using the (#) parameter flag." - # - # "Mummy, why is nothing ever quite as simple as it should be?" - # - # "Well, dear, if it was then the clever people who write programmes would - # have been replaced by intelligent monkeys and then they'd be out - # of working roaming the streets, and we wouldn't want that, would we?" - mp_tmp=("${(@q)mp_tmp//(#m)\\[0-7](#c3)/${(#)$(( 8#${MATCH[2,-1]} ))}}") - dpath_tmp=( "${(@Mq)dev_tmp:#/*}" ) - dev_tmp=( "${(@q)dev_tmp:#/*}" ) + mp_tmp=("${(@qg::)mp_tmp}") + dpath_tmp=( "${(@Mqg::)dev_tmp:#/*}" ) + dev_tmp=( "${(@qg::)dev_tmp:#/*}" ) _alternative \ 'device-labels:device label:compadd -a dev_tmp' \ -- 2.2.0.GIT