zsh-users
 help / color / mirror / code / Atom feed
From: Peter Stephenson <p.stephenson@samsung.com>
To: Zsh Users <zsh-users@zsh.org>
Subject: Re: scp completion options
Date: Fri, 29 Jun 2018 09:33:22 +0100	[thread overview]
Message-ID: <20180629083324eucas1p186be36055bfc764f4d7bc884235beebd~8lHVA-nVD2372623726eucas1p1k@eucas1p1.samsung.com> (raw)
In-Reply-To: <20180627091514.22955a04@camnpupstephen.cam.scsc.local>

On Wed, 27 Jun 2018 09:15:14 +0100
Peter Stephenson <p.stephenson@samsung.com> wrote:
>..,
> But actually I don't see how to get this to work in the case you're
> talking about (hence the question marks), because the tag for remote
> files is just 'files' so will allow it to complete local files.  This
> looks to me like a mistake, and _remote_files should arrange for a
> different tag.
> 
> I may be missing something, but if I'm not, changing _remote_files
> ought to be easy.

This does appear to do the trick.  I propose to submit this.

pws

diff --git a/Completion/Unix/Type/_remote_files b/Completion/Unix/Type/_remote_files
index a5fce9a..267715a 100644
--- a/Completion/Unix/Type/_remote_files
+++ b/Completion/Unix/Type/_remote_files
@@ -75,9 +75,9 @@ if zstyle -T ":completion:${curcontext}:files" remote-access; then
     remdispf=( ${(M)remdispf:#${~glob[2]}} )
   fi
 
-  _tags files
+  _tags remote-files
   while _tags; do
-    while _next_label files expl ${suf:-remote directory}; do
+    while _next_label remote-files expl ${suf:-remote directory}; do
       [[ -n $suf ]] &&
           compadd "$args[@]" "$expl[@]" -d remdispf -- ${(q)remdispf%[*=|]} && ret=0
       compadd ${suf:+-S/} -r "/ \t\n\-" "$args[@]" "$expl[@]" -d remdispd \
diff --git a/README b/README
index 2cf2266..fd4c59e 100644
--- a/README
+++ b/README
@@ -32,9 +32,17 @@ Zsh is a shell with lots of features.  For a list of some of these, see the
 file FEATURES, and for the latest changes see NEWS.  For more
 details, see the documentation.
 
-Incompatibilities since 5.4.2
+Incompatibilities since 5.5.1
 -----------------------------
 
+The completion helper _remote_files, typically used after a hostname
+with scp-style completion, now uses remote-files instead of files as a
+tag.  This makes it easier to restrict completions with the tag-order
+style.
+
+Incompatibilities between 5.4.2 and 5.5.1
+-----------------------------------------
+
 1) The default build-time maximum nested function depth has been
 decreased from 1000 to 500 based on user experience.  However,
 it can now be changed at run time via the variable FUNCNEST.


      parent reply	other threads:[~2018-06-29  8:33 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20180626231957epcas4p275197b8b1b133496936cd1e2a59d15b6@epcas4p2.samsung.com>
2018-06-26 23:06 ` David Woodfall
2018-06-27  8:15   ` Peter Stephenson
2018-06-27 10:13     ` David Woodfall
2018-06-28  8:38       ` Peter Stephenson
2018-06-28 20:14         ` David Woodfall
2018-06-28 20:26           ` Bart Schaefer
2018-06-28 20:56             ` David Woodfall
2018-06-29  0:31               ` Bart Schaefer
2018-06-29  2:31                 ` David Woodfall
2018-08-20 14:51                 ` David Woodfall
     [not found]   ` <20180627091514.22955a04@camnpupstephen.cam.scsc.local>
2018-06-29  8:33     ` Peter Stephenson [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='20180629083324eucas1p186be36055bfc764f4d7bc884235beebd~8lHVA-nVD2372623726eucas1p1k@eucas1p1.samsung.com' \
    --to=p.stephenson@samsung.com \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).