zsh-users
 help / color / mirror / code / Atom feed
From: Hannu Koivisto <azure@iki.fi>
To: Oliver Kiddle <okiddle@yahoo.co.uk>
Cc: zsh-users@sunsite.dk
Subject: Re: Remote scp completion that can handle spaces etc. in pathnames
Date: Thu, 13 Feb 2003 17:06:14 +0200	[thread overview]
Message-ID: <87heb8p6e1.fsf@lynx.ionific.com> (raw)
In-Reply-To: <29391.1045147304@finches.logica.co.uk> (Oliver Kiddle's message of "Thu, 13 Feb 2003 15:41:44 +0100")

Oliver Kiddle <okiddle@yahoo.co.uk> writes:

> Patch below should fix this. _ssh has changed a bit since 4.0.4 so I'm
> not sure how easy it would be to modify for that.

Thanks!  It applied to 4.0.4 just fine.  However, I needed 
an additional modification to make it work with filenames such as
``[foo bar* |'' -- * and | didn't appear at all without this
modification.  I wonder if this breaks something elsewhere?  See
the modification below, within your patch.

>> I also note that pathnames in remote commands are not completed
>> remotely, i.e. if I write ``ssh somehost ls f<tab>'', zsh completes
>> local filesystem entries beginning with f.  I wonder if this could
>> be smarter as well.
>
> It could possibly be done by somehow doing a temporary substitution of
> _path_files by _remote_files but saving the original _path_files and
> doing any other necessary fiddling would be more than a bit messy so I'm
> not going to attempt it.

Ok, I can certainly live without such a feature.

> Oliver
>
> Index: Completion/Unix/Command/_ssh
> ===================================================================
> RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_ssh,v
> retrieving revision 1.18
> diff -u -r1.18 _ssh
> --- Completion/Unix/Command/_ssh	7 Jan 2003 08:49:16 -0000	1.18
> +++ Completion/Unix/Command/_ssh	13 Feb 2003 14:29:21 -0000
> @@ -17,9 +17,9 @@
>      while _tags; do
>        while _next_label files expl ${suf:-remote directory}; do
>          [[ -n $suf ]] && compadd "$@" "$expl[@]" -d remdispf \
> -	    ${remdispf%[*=@|]} && ret=0 
> +	    ${(q)remdispf%[*=@|]} && ret=0 

I replaced the above line with this:

+	    ${(q)remdispf%[=@]} && ret=0 

>  	compadd ${suf:+-S/} "$@" "$expl[@]" -d remdispd \
> -	    ${remdispd%/} && ret=0
> +	    ${(q)remdispd%/} && ret=0
>        done
>        (( ret )) || return 0
>      done

-- 
Hannu


  reply	other threads:[~2003-02-13 15:06 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-02-13 13:30 Hannu Koivisto
2003-02-13 14:41 ` Oliver Kiddle
2003-02-13 15:06   ` Hannu Koivisto [this message]
2003-02-13 16:12     ` Oliver Kiddle
2003-02-17  9:18       ` Hannu Koivisto

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=87heb8p6e1.fsf@lynx.ionific.com \
    --to=azure@iki.fi \
    --cc=okiddle@yahoo.co.uk \
    --cc=zsh-users@sunsite.dk \
    /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).