mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-11-19 21:44:11 +01:00
pass -F option through to ssh when getting remote files for scp completion
This commit is contained in:
parent
f4065b138b
commit
30aa9063e8
@ -1,5 +1,8 @@
|
||||
2002-09-03 Oliver Kiddle <opk@zsh.org>
|
||||
|
||||
* Thomas Köhler: 176xx: Completion/Unix/Command/_ssh: also pass
|
||||
through -F option
|
||||
|
||||
* 17607: Completion/Unix/Command/_ssh: pass through options such as
|
||||
the port number to ssh when getting remote files for scp
|
||||
|
||||
|
@ -5,7 +5,7 @@ _remote_files () {
|
||||
local expl remfiles remdispf remdispd args suf ret=1
|
||||
|
||||
if zstyle -T ":completion:${curcontext}:" remote-access; then
|
||||
zparseopts -D -E -a args p: 1 2 4 6
|
||||
zparseopts -D -E -a args p: 1 2 4 6 F:
|
||||
remfiles=(${(M)${(f)"$(ssh $args -a -x ${words[CURRENT]%%:*} ls -d1F ${PREFIX%%[^./][^/]#}\* 2>/dev/null)"}%%[^/]#(|/)})
|
||||
compset -P '*/'
|
||||
compset -S '/*' || suf='remote file'
|
||||
@ -263,7 +263,7 @@ _ssh () {
|
||||
;;
|
||||
file)
|
||||
if compset -P '*:'; then
|
||||
_remote_files ${(kv)opt_args[(I)-[P1246]]/-P/-p} && ret=0
|
||||
_remote_files ${(kv)~opt_args[(I)-[FP1246]]/-P/-p} && ret=0
|
||||
elif compset -P '*@'; then
|
||||
_wanted hosts expl host _ssh_hosts -S: && ret=0
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user