Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: A cute bug involving aliases and _remote_files
- X-seq: zsh-workers 44085
- From: dana <dana@xxxxxxx>
- To: Philippe Troin <phil@xxxxxxxx>
- Subject: Re: A cute bug involving aliases and _remote_files
- Date: Tue, 26 Feb 2019 03:23:04 -0600
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- 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==
- In-reply-to: <0d066d726a76a85461089339e25e207663d389b7.camel@fifi.org>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <0d066d726a76a85461089339e25e207663d389b7.camel@fifi.org>
On 25 Feb 2019, at 20:49, Philippe Troin <phil@xxxxxxxx> 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 — 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
# remote filenames
- remfiles=(${(M)${(f)"$(_call_program files $cmd $cmd_args $host ls -d1FL -- "$rempat" 2>/dev/null)"}%%[^/]#(|/)})
+ remfiles=(${(M)${(f)"$(
+ _call_program files $cmd $cmd_args $host \
+ QUOTING_STYLE=literal command ls -d1FL -- "$rempat" 2>/dev/null
+ )"}%%[^/]#(|/)})
compset -P '*/'
compset -S '/*' || (( ${args[(I)-/]} )) || suf='remote file'
Messages sorted by:
Reverse Date,
Date,
Thread,
Author