From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id cd764a7b for ; Tue, 26 Feb 2019 09:23:59 +0000 (UTC) Received: (qmail 17731 invoked by alias); 26 Feb 2019 09:23:43 -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: 44085 Received: (qmail 8842 invoked by uid 1010); 26 Feb 2019 09:23:43 -0000 X-Qmail-Scanner-Diagnostics: from mail-io1-f68.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.100.2/25370. spamassassin: 3.4.2. Clear:RC:0(209.85.166.68):SA:0(-1.9/5.0):. Processed in 1.99606 secs); 26 Feb 2019 09:23:43 -0000 X-Envelope-From: dana@dana.is X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.166.68 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dana-is.20150623.gappssmtp.com; s=20150623; h=mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=b1EGLtZxOLHxTHJgjQinFTSTFvH8Z+aXxlvT8oAXFU0=; b=vWaFtaxHW4FKuIay0H/cwZcfPvAdKTlejGZskfIOzW/KSOCj4Y6icCbbVs6MDZdyQW Q3i0v+8cNGmFOVo7DDCNfki0yBEsj1XSpiqj60/SCMveoB7zYwSsu7Di59d8L7MFyzTF UAeNpKtpiNFWd8DLUPOFPbl9lzjTJs92k8CcU/rHp2jaqK9i2tmnP2VBpMOv42ssoxMq 7djZF+1ChwvTZJeSl2aeC11cwshWwQz/agxMCVJAToXjWJEHFZcD2JAWPoyBBTRPTWmo Nex1UVL2vSsm1bPQ4joqqSC7sl+JI/50aoAj/YzzHWxrfYzYRWMihMo9hkOZTAWCqzHS RSSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=b1EGLtZxOLHxTHJgjQinFTSTFvH8Z+aXxlvT8oAXFU0=; b=USfE/znSHn6DXj99/2XOnS4Yr1De7Qp8AF+aCazs+QjGrtr+Otsx0ECilj87zBO8SZ QdnngG/ksVfKpglMD0YfwqLaxc/sD6u8p35Q3xaE/8LgLM4+nOk5su+tWy5WxrM2gHYM DlIVdRObr3lEJKdpo10tl4R3UKdXoCIAbChd8boT6kXXyYNenxrJRl4J7VQMyMzcMWSS KmuDvHN/ntMOfTY3xxO4Sk9Kt34qWWM72V4rkG5CxU/LDX7EKU/RU6YXr9c2HKdKKd1B +M8EGJIo3zL88sN9oq4FZhDb9pH+0paT+inXMb10xWkfew4HKDn5+znWd2dlJtfvcR/h vkLw== X-Gm-Message-State: AHQUAuYh4mp3RgRpdYMH6YUaJEkPl5akx0A9eDZQ0VJ+BlLSXwnSsKsD cyMTyyqwArAbNvPPCk5+2h6v7wLuzb0B9A== X-Google-Smtp-Source: AHgI3IZ2YyEV8Qw5aotOu1i/kCBnq3S8GY5tCQYOqWy5eP/bdxAw2ktOSAdsSJQIIy8ZrYG7/ciodA== X-Received: by 2002:a6b:d00a:: with SMTP id x10mr12191008ioa.46.1551172987644; Tue, 26 Feb 2019 01:23:07 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.0 \(3445.100.39\)) Subject: Re: A cute bug involving aliases and _remote_files From: dana In-Reply-To: <0d066d726a76a85461089339e25e207663d389b7.camel@fifi.org> Date: Tue, 26 Feb 2019 03:23:04 -0600 Cc: Zsh hackers list Content-Transfer-Encoding: quoted-printable Message-Id: <3D38E0FC-DE43-4CFD-86E2-B258D9DA816C@dana.is> References: <0d066d726a76a85461089339e25e207663d389b7.camel@fifi.org> To: Philippe Troin X-Mailer: Apple Mail (2.3445.100.39) On 25 Feb 2019, at 20:49, Philippe Troin wrote: >Would it make sense to use "command ls" instead of "ls" for remote >directory listings in _remote_files? That would make sure that no >aliases nor functions are involved. That *seems* reasonable...? Now that you mention it, GNU ls changed its default quoting behaviour = somewhat recently. I think it only quotes when (a) QUOTING_STYLE is set, (b) one = of the quoting options is given on the command line, or (c) the output is a TTY = =E2=80=94 so it's unlikely to be an issue for _remote_files, given how it's normally = used. But maybe it'd be a good idea to force it off anyway, just in case? dana diff --git a/Completion/Unix/Type/_remote_files = b/Completion/Unix/Type/_remote_files index 267715a51..89cf102cf 100644 --- a/Completion/Unix/Type/_remote_files +++ b/Completion/Unix/Type/_remote_files @@ -59,7 +59,10 @@ if zstyle -T ":completion:${curcontext}:files" = remote-access; then fi =20 # remote filenames - remfiles=3D(${(M)${(f)"$(_call_program files $cmd $cmd_args $host ls = -d1FL -- "$rempat" 2>/dev/null)"}%%[^/]#(|/)}) + remfiles=3D(${(M)${(f)"$( + _call_program files $cmd $cmd_args $host \ + QUOTING_STYLE=3Dliteral command ls -d1FL -- "$rempat" 2>/dev/null + )"}%%[^/]#(|/)}) =20 compset -P '*/' compset -S '/*' || (( ${args[(I)-/]} )) || suf=3D'remote file'