Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: scp completion options



On Wed, 27 Jun 2018 11:13:12 +0100
David Woodfall <dave@xxxxxxxxxxxxxx> 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




Messages sorted by: Reverse Date, Date, Thread, Author