zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH] scp distinguish local file from remote file
@ 2013-03-19  9:33 Han Pingtian
  2013-03-19 20:59 ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Han Pingtian @ 2013-03-19  9:33 UTC (permalink / raw)
  To: zsh-workers

If a file path starting with a '.' or '/', then it should be a local
file/dir, even if there are colons in the path. This will try to fix
this problem:

➜aimlp7 ~ ☻ ls /var/crash/biglp9/10.33.5.227-2013.03.19-04:21:30
vmcore.flat
➜aimlp7 ~ ☻ scp /var/crash/biglp9/10.33.5.227-2013.03.19-04:21:30<tab>
No matches: `file', `option', `remote file', or `corrections'
---
 Completion/Unix/Command/_ssh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Completion/Unix/Command/_ssh b/Completion/Unix/Command/_ssh
index 7e85e2b..8711b6b 100644
--- a/Completion/Unix/Command/_ssh
+++ b/Completion/Unix/Command/_ssh
@@ -519,7 +519,7 @@ _ssh () {
       fi
       ;;
     file)
-      if compset -P '*:'; then
+      if compset -P '[^./]*:'; then
         _remote_files -- ssh ${(kv)~opt_args[(I)-[FP1246]]/-P/-p} && ret=0
       elif compset -P '*@'; then
         suf=( -S '' )
-- 
1.7.7.6


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-03-20  5:47 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-03-19  9:33 [PATCH] scp distinguish local file from remote file Han Pingtian
2013-03-19 20:59 ` Peter Stephenson
2013-03-20  5:36   ` Han Pingtian

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).