runtime(netrw): prefer scp over pscp

Commit: 
https://github.com/vim/vim/commit/43f2edc096cbf9c67095b301a1f4325866eeba36
Author: Christian Brabandt <c...@256bit.org>
Date:   Mon May 13 20:56:43 2024 +0200

    runtime(netrw): prefer scp over pscp
    
    regression introduced in ce2ad9ffd79fe6b2307cd46b9
    
    The current logic is a bit funny, in that it checks for an executable of
    scp, then pscp and if neither exists, it uses: scp :/
    Anyway, let's fall back to the logic used before the above commit.
    
    related: #14739
    
    Signed-off-by: Christian Brabandt <c...@256bit.org>

diff --git a/runtime/autoload/netrw.vim b/runtime/autoload/netrw.vim
index 4c95d2c71..a9c88f039 100644
--- a/runtime/autoload/netrw.vim
+++ b/runtime/autoload/netrw.vim
@@ -12,6 +12,7 @@
 "   2024 May 08 by Vim Project: cleanup legacy Win9X checks
 "   2024 May 09 by Vim Project: remove hard-coded private.ppk
 "   2024 May 10 by Vim Project: recursively delete directories by default
+"   2024 May 13 by Vim Project: prefer scp over pscp
 " Former Maintainer:   Charles E Campbell
 " GetLatestVimScripts: 1075 1 :AutoInstall: netrw.vim
 " Copyright:    Copyright (C) 2016 Charles E. Campbell {{{1
@@ -283,13 +284,14 @@ call s:NetrwInit("g:netrw_rcp_cmd"  , "rcp")
 call s:NetrwInit("g:netrw_rsync_cmd", "rsync")
 call s:NetrwInit("g:netrw_rsync_sep", "/")
 if !exists("g:netrw_scp_cmd")
- if executable("pscp")
+ if executable("scp")
+  call s:NetrwInit("g:netrw_scp_cmd" , "scp -q")
+ elseif executable("pscp")
   call s:NetrwInit("g:netrw_scp_cmd", 'pscp -q')
  else
   call s:NetrwInit("g:netrw_scp_cmd" , "scp -q")
  endif
 endif
-
 call s:NetrwInit("g:netrw_sftp_cmd" , "sftp")
 call s:NetrwInit("g:netrw_ssh_cmd"  , "ssh")
 

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to vim_dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/vim_dev/E1s6b8i-00HMbT-VS%40256bit.org.

Raspunde prin e-mail lui