From: David Woodfall <dave@dawoodfall.net>
To: zsh-users@zsh.org
Subject: Re: scp completion options
Date: Thu, 28 Jun 2018 21:14:57 +0100 [thread overview]
Message-ID: <20180628201457.GG21870@blackswan> (raw)
In-Reply-To: <20180628083835eucas1p2cb57feab1bca1540ed0a89cd6e26b9bb~8RikRcvz81808218082eucas1p2p@eucas1p2.samsung.com>
On Thursday 28 June 2018 09:38,
Peter Stephenson <p.stephenson@samsung.com> put forth the proposition:
> On Wed, 27 Jun 2018 11:13:12 +0100
> David Woodfall <dave@dawoodfall.net> wrote:
> > > scp_comp_helper() {
> > > if [[ CURRENT -gt 2 && $words[2] != *:* && ]]; then
> > > # Complete remotely only...?
> > > reply=('hosts ????')
> > > else
> > > reply=('hosts files')
> > > fi
> > > }
> > > zstyle -e ':completion:*:complete:scp:*:' tag-order
> > > scp_comp_helper
> >
> > That's giving me an error on the 'if' line:
>
> You need to get rid of the second && --- I originally had another test
> I thought better of but didn't get rid of in the version I copied
> into the e-mail, so it wasn't quite what I actually tried out.
>
> As no-one has come up with anything better I may play with changing
> _remote_files to use the tag remote-files and see if that helps.
>
> pws
>
>
Thanks. It seems to do the trick.
I've still to discover why sometimes remote names get escape for no
apparent reason. eg I have a patch on the remote named:
0001-fix-typo-in-rc.geomyidae-slackware-init-script.patch
This is the first item completed after hitting tab, but it is listed
as
^[k*^[\0001-fix-typo-in-rc.geomyidae-slackware-init-script.patch
in the completion menu, and like
\$\'\\033\'k\\\*\$\'\\033\'\\\\0001-fix-typo-in-rc.geomyidae-slackware-init-script.patch
On the command line after the 'host:'
It's obviously an escape code, and I do use a few, but I can't find
anything with a 'k' or *$ in it.
-Dave
--
Not me, guy. I read the Bash man page each day like a Jehovah's Witness reads
the Bible. No wait, the Bash man page IS the bible. Excuse me...
-- More on confusing aliases, taken from comp.os.linux.misc
.--. oo
(____)//
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'
next prev parent reply other threads:[~2018-06-28 20:15 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 [this message]
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
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=20180628201457.GG21870@blackswan \
--to=dave@dawoodfall.net \
--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).