mirror of
https://github.com/Gator96100/ProxSpace.git
synced 2025-08-14 02:27:03 -07:00
Updated msys2 to msys2-base-x86_64-20200903
This commit is contained in:
parent
5bc8dbdc75
commit
2307d54cb1
18501 changed files with 1684082 additions and 720361 deletions
|
@ -2,8 +2,9 @@
|
|||
|
||||
_ssh_queries()
|
||||
{
|
||||
COMPREPLY+=( $( compgen -W \
|
||||
"cipher cipher-auth mac kex key protocol-version" -- "$cur" ) )
|
||||
COMPREPLY+=( $(compgen -W \
|
||||
"cipher cipher-auth mac kex key key-cert key-plain protocol-version sig" \
|
||||
-- "$cur") )
|
||||
}
|
||||
|
||||
_ssh_query()
|
||||
|
@ -13,44 +14,61 @@ _ssh_query()
|
|||
|
||||
_ssh_ciphers()
|
||||
{
|
||||
local ciphers='$( _ssh_query "$1" cipher )'
|
||||
local ciphers='$(_ssh_query "$1" cipher)'
|
||||
[[ $ciphers ]] || ciphers="3des-cbc aes128-cbc aes192-cbc aes256-cbc
|
||||
aes128-ctr aes192-ctr aes256-ctr arcfour128 arcfour256 arcfour
|
||||
blowfish-cbc cast128-cbc"
|
||||
COMPREPLY+=( $( compgen -W "$ciphers" -- "$cur" ) )
|
||||
COMPREPLY+=( $(compgen -W "$ciphers" -- "$cur") )
|
||||
}
|
||||
|
||||
_ssh_macs()
|
||||
{
|
||||
local macs='$( _ssh_query "$1" mac )'
|
||||
local macs='$(_ssh_query "$1" mac)'
|
||||
[[ $macs ]] || macs="hmac-md5 hmac-sha1 umac-64@openssh.com hmac-ripemd160
|
||||
hmac-sha1-96 hmac-md5-96"
|
||||
COMPREPLY+=( $( compgen -W "$macs" -- "$cur" ) )
|
||||
COMPREPLY+=( $(compgen -W "$macs" -- "$cur") )
|
||||
}
|
||||
|
||||
_ssh_options()
|
||||
{
|
||||
compopt -o nospace
|
||||
COMPREPLY=( $( compgen -S = -W 'AddressFamily BatchMode BindAddress
|
||||
ChallengeResponseAuthentication CheckHostIP Cipher Ciphers
|
||||
ClearAllForwardings Compression CompressionLevel ConnectionAttempts
|
||||
ConnectTimeout ControlMaster ControlPath ControlPersist DynamicForward
|
||||
EnableSSHKeysign EscapeChar ExitOnForwardFailure ForwardAgent
|
||||
ForwardX11 ForwardX11Timeout ForwardX11Trusted GatewayPorts
|
||||
GlobalKnownHostsFile GSSAPIAuthentication GSSAPIClientIdentity
|
||||
GSSAPIDelegateCredentials GSSAPIKeyExchange GSSAPIRenewalForcesRekey
|
||||
GSSAPIServerIdentity GSSAPITrustDns HashKnownHosts Host
|
||||
HostbasedAuthentication HostKeyAlgorithms HostKeyAlias HostName
|
||||
IdentityFile IdentitiesOnly IPQoS KbdInteractiveDevices KexAlgorithms
|
||||
local opts=(
|
||||
AddKeysToAgent AddressFamily BatchMode BindAddress CanonicalDomains
|
||||
CanonicalizeFallbackLocal CanonicalizeHostname CanonicalizeMaxDots
|
||||
CanonicalizePermittedCNAMEs CASignatureAlgorithms CertificateFile
|
||||
ChallengeResponseAuthentication CheckHostIP Ciphers ClearAllForwardings
|
||||
Compression ConnectionAttempts ConnectTimeout ControlMaster ControlPath
|
||||
ControlPersist DynamicForward EnableSSHKeysign EscapeChar
|
||||
ExitOnForwardFailure FingerprintHash ForwardAgent ForwardX11
|
||||
ForwardX11Timeout ForwardX11Trusted GatewayPorts GlobalKnownHostsFile
|
||||
GSSAPIAuthentication GSSAPIClientIdentity GSSAPIDelegateCredentials
|
||||
GSSAPIKeyExchange GSSAPIRenewalForcesRekey GSSAPIServerIdentity
|
||||
GSSAPITrustDns HashKnownHosts Host HostbasedAuthentication
|
||||
HostbasedKeyTypes HostKeyAlgorithms HostKeyAlias HostName
|
||||
IdentitiesOnly IdentityAgent IdentityFile IgnoreUnknown Include IPQoS
|
||||
KbdInteractiveAuthentication KbdInteractiveDevices KexAlgorithms
|
||||
LocalCommand LocalForward LogLevel MACs
|
||||
NoHostAuthenticationForLocalhost NumberOfPasswordPrompts ProxyJump
|
||||
NoHostAuthenticationForLocalhost NumberOfPasswordPrompts
|
||||
PasswordAuthentication PermitLocalCommand PKCS11Provider Port
|
||||
PreferredAuthentications Protocol ProxyCommand PubkeyAuthentication
|
||||
RekeyLimit RemoteForward RequestTTY RhostsRSAAuthentication
|
||||
RSAAuthentication SendEnv ServerAliveCountMax ServerAliveInterval
|
||||
SmartcardDevice StrictHostKeyChecking TCPKeepAlive Tunnel TunnelDevice
|
||||
UsePrivilegedPort User UserKnownHostsFile VerifyHostKeyDNS
|
||||
VisualHostKey XAuthLocation' -- "$cur" ) )
|
||||
PreferredAuthentications ProxyCommand ProxyJump ProxyUseFdpass
|
||||
PubkeyAcceptedKeyTypes PubkeyAuthentication RekeyLimit RemoteCommand
|
||||
RemoteForward RequestTTY RevokedHostKeys SendEnv ServerAliveCountMax
|
||||
ServerAliveInterval SmartcardDevice StreamLocalBindMask
|
||||
StreamLocalBindUnlink StrictHostKeyChecking SyslogFacility TCPKeepAlive
|
||||
Tunnel TunnelDevice UpdateHostKeys UsePrivilegedPort User
|
||||
UserKnownHostsFile VerifyHostKeyDNS VisualHostKey XAuthLocation )
|
||||
local protocols=$(_ssh_query "$1" protocol-version)
|
||||
if [[ -z $protocols || $protocols == *1* ]]; then
|
||||
opts+=( Cipher CompressionLevel Protocol RhostsRSAAuthentication
|
||||
RSAAuthentication )
|
||||
fi
|
||||
|
||||
compopt -o nospace
|
||||
local IFS=$' \t\n' reset=$(shopt -p nocasematch); shopt -s nocasematch
|
||||
local option
|
||||
COMPREPLY=( $(for option in "${opts[@]}"; do
|
||||
[[ $option == "$cur"* ]] && printf '%s=\n' "$option"
|
||||
done) )
|
||||
$reset
|
||||
}
|
||||
|
||||
# Complete a ssh suboption (like ForwardAgent=y<tab>)
|
||||
|
@ -63,61 +81,111 @@ _ssh_suboption()
|
|||
# Split into subopt and subval
|
||||
local prev=${1%%=*} cur=${1#*=}
|
||||
|
||||
case $prev in
|
||||
BatchMode|ChallengeResponseAuthentication|CheckHostIP|\
|
||||
ClearAllForwardings|ControlPersist|Compression|EnableSSHKeysign|\
|
||||
ExitOnForwardFailure|ForwardAgent|ForwardX11|ForwardX11Trusted|\
|
||||
GatewayPorts|GSSAPIAuthentication|GSSAPIKeyExchange|\
|
||||
GSSAPIDelegateCredentials|GSSAPIRenewalForcesRekey|GSSAPITrustDns|\
|
||||
HashKnownHosts|HostbasedAuthentication|IdentitiesOnly|\
|
||||
KbdInteractiveAuthentication|KbdInteractiveDevices|\
|
||||
NoHostAuthenticationForLocalhost|PasswordAuthentication|\
|
||||
PubkeyAuthentication|RhostsRSAAuthentication|RSAAuthentication|\
|
||||
StrictHostKeyChecking|TCPKeepAlive|UsePrivilegedPort|\
|
||||
VerifyHostKeyDNS|VisualHostKey)
|
||||
COMPREPLY=( $( compgen -W 'yes no' -- "$cur" ) )
|
||||
case ${prev,,} in
|
||||
batchmode|canonicaldomains|canonicalizefallbacklocal|\
|
||||
challengeresponseauthentication|checkhostip|\
|
||||
clearallforwardings|controlpersist|compression|enablesshkeysign|\
|
||||
exitonforwardfailure|forwardagent|forwardx11|forwardx11trusted|\
|
||||
gatewayports|gssapiauthentication|gssapikeyexchange|\
|
||||
gssapidelegatecredentials|gssapirenewalforcesrekey|gssapitrustdns|\
|
||||
hashknownhosts|hostbasedauthentication|identitiesonly|\
|
||||
kbdinteractiveauthentication|kbdinteractivedevices|\
|
||||
nohostauthenticationforlocalhost|passwordauthentication|permitlocalcommand|\
|
||||
proxyusefdpass|pubkeyauthentication|rhostsrsaauthentication|\
|
||||
rsaauthentication|streamlocalbindunlink|\
|
||||
tcpkeepalive|useprivilegedport|visualhostkey)
|
||||
COMPREPLY=( $(compgen -W 'yes no' -- "$cur") )
|
||||
;;
|
||||
AddressFamily)
|
||||
COMPREPLY=( $( compgen -W 'any inet inet6' -- "$cur" ) )
|
||||
addkeystoagent)
|
||||
COMPREPLY=( $(compgen -W 'yes ask confirm no' -- "$cur") )
|
||||
;;
|
||||
BindAddress)
|
||||
addressfamily)
|
||||
COMPREPLY=( $(compgen -W 'any inet inet6' -- "$cur") )
|
||||
;;
|
||||
bindaddress)
|
||||
_ip_addresses
|
||||
;;
|
||||
Cipher)
|
||||
COMPREPLY=( $( compgen -W 'blowfish des 3des' -- "$cur" ) )
|
||||
canonicalizehostname)
|
||||
COMPREPLY=( $(compgen -W 'yes no always' -- "$cur") )
|
||||
;;
|
||||
ProxyJump)
|
||||
_known_hosts_real -a -F "$configfile" -- "$cur"
|
||||
identityfile)
|
||||
_ssh_identityfile
|
||||
;;
|
||||
IPQoS)
|
||||
COMPREPLY=( $( compgen -W 'af1{1..4} af2{2..3} af3{1..3} af4{1..3}
|
||||
cs{0..7} ef lowdelay throughput reliability' -- "$cur" ) )
|
||||
*file|identityagent|include|controlpath|revokedhostkeys|xauthlocation)
|
||||
_filedir
|
||||
;;
|
||||
HostbasedKeyTypes|HostKeyAlgorithms)
|
||||
COMPREPLY=( $( compgen -W '$( _ssh_query "$2" key )' -- "$cur" ) )
|
||||
casignaturealgorithms)
|
||||
COMPREPLY=( $(compgen -W '$(_ssh_query "$2" sig)' -- "$cur") )
|
||||
;;
|
||||
KexAlgorithms)
|
||||
COMPREPLY=( $( compgen -W '$( _ssh_query "$2" kex )' -- "$cur" ) )
|
||||
cipher)
|
||||
COMPREPLY=( $(compgen -W 'blowfish des 3des' -- "$cur") )
|
||||
;;
|
||||
Protocol)
|
||||
COMPREPLY=( $( compgen -W '1 2 1,2 2,1' -- "$cur" ) )
|
||||
ciphers)
|
||||
_ssh_ciphers "$2"
|
||||
;;
|
||||
RequestTTY)
|
||||
COMPREPLY=( $( compgen -W 'no yes force auto' -- "$cur" ) )
|
||||
controlmaster)
|
||||
COMPREPLY=( $(compgen -W 'yes ask auto autoask no' -- "$cur") )
|
||||
;;
|
||||
Tunnel)
|
||||
COMPREPLY=( $( compgen -W 'yes no point-to-point ethernet' \
|
||||
-- "$cur" ) )
|
||||
compressionlevel)
|
||||
COMPREPLY=( $(compgen -W '{1..9}' -- "$cur") )
|
||||
;;
|
||||
PreferredAuthentications)
|
||||
COMPREPLY=( $( compgen -W 'gssapi-with-mic host-based publickey
|
||||
keyboard-interactive password' -- "$cur" ) )
|
||||
fingerprinthash)
|
||||
COMPREPLY=( $(compgen -W 'md5 sha256' -- "$cur") )
|
||||
;;
|
||||
MACs)
|
||||
ipqos)
|
||||
COMPREPLY=( $(compgen -W 'af1{1..4} af2{2..3} af3{1..3} af4{1..3}
|
||||
cs{0..7} ef lowdelay throughput reliability' -- "$cur") )
|
||||
;;
|
||||
hostbasedkeytypes|hostkeyalgorithms)
|
||||
COMPREPLY=( $(compgen -W '$(_ssh_query "$2" key)' -- "$cur") )
|
||||
;;
|
||||
kexalgorithms)
|
||||
COMPREPLY=( $(compgen -W '$(_ssh_query "$2" kex)' -- "$cur") )
|
||||
;;
|
||||
loglevel)
|
||||
COMPREPLY=( $(compgen -W 'QUIET FATAL ERROR INFO VERBOSE DEBUG{,1,2,3}' -- "$cur") )
|
||||
;;
|
||||
macs)
|
||||
_ssh_macs "$2"
|
||||
;;
|
||||
Ciphers)
|
||||
_ssh_ciphers "$2"
|
||||
pkcs11provider)
|
||||
_filedir so
|
||||
;;
|
||||
preferredauthentications)
|
||||
COMPREPLY=( $(compgen -W 'gssapi-with-mic host-based publickey
|
||||
keyboard-interactive password' -- "$cur") )
|
||||
;;
|
||||
protocol)
|
||||
local protocols=( $(_ssh_query "$2" protocol-version) )
|
||||
[[ $protocols ]] || protocols=(1 2)
|
||||
if [[ ${#protocols[@]} -gt 1 ]]; then
|
||||
COMPREPLY=( $(compgen -W '${protocols[@]}' -- "$cur") )
|
||||
fi
|
||||
;;
|
||||
proxyjump)
|
||||
_known_hosts_real -a -F "$configfile" -- "$cur"
|
||||
;;
|
||||
proxycommand|remotecommand|localcommand)
|
||||
COMPREPLY=( $(compgen -c -- "$cur") )
|
||||
;;
|
||||
pubkeyacceptedkeytypes)
|
||||
COMPREPLY=( $(compgen -W '$(_ssh_query "$2" key)' -- "$cur") )
|
||||
;;
|
||||
requesttty)
|
||||
COMPREPLY=( $(compgen -W 'no yes force auto' -- "$cur") )
|
||||
;;
|
||||
stricthostkeychecking)
|
||||
COMPREPLY=( $(compgen -W 'accept-new ask no off' -- "$cur") )
|
||||
;;
|
||||
syslogfacility)
|
||||
COMPREPLY=( $(compgen -W 'DAEMON USER AUTH LOCAL{0..7}' -- "$cur") )
|
||||
;;
|
||||
tunnel)
|
||||
COMPREPLY=( $(compgen -W 'yes no point-to-point ethernet' \
|
||||
-- "$cur") )
|
||||
;;
|
||||
updatehostkeys|verifyhostkeydns)
|
||||
COMPREPLY=( $(compgen -W 'yes no ask' -- "$cur") )
|
||||
;;
|
||||
esac
|
||||
return 0
|
||||
|
@ -130,7 +198,7 @@ _ssh_suboption_check()
|
|||
{
|
||||
# Get prev and cur words without splitting on =
|
||||
local cureq=`_get_cword :=` preveq=`_get_pword :=`
|
||||
if [[ $cureq == *=* && $preveq == -o ]]; then
|
||||
if [[ $cureq == *=* && $preveq == -*o ]]; then
|
||||
_ssh_suboption $cureq "$1"
|
||||
return $?
|
||||
fi
|
||||
|
@ -155,6 +223,17 @@ _ssh_configfile()
|
|||
done
|
||||
}
|
||||
|
||||
# With $1 set, look for public key files, else private
|
||||
_ssh_identityfile()
|
||||
{
|
||||
[[ -z $cur && -d ~/.ssh ]] && cur=~/.ssh/id
|
||||
_filedir
|
||||
if (( ${#COMPREPLY[@]} > 0 )); then
|
||||
COMPREPLY=( $(compgen -W '${COMPREPLY[@]}' \
|
||||
-X "${1:+!}*.pub" -- "$cur") )
|
||||
fi
|
||||
}
|
||||
|
||||
_ssh()
|
||||
{
|
||||
local cur prev words cword
|
||||
|
@ -170,55 +249,62 @@ _ssh()
|
|||
local ipvx
|
||||
|
||||
case $prev in
|
||||
-F|-i|-S)
|
||||
_filedir
|
||||
return
|
||||
-*4*)
|
||||
ipvx=-4
|
||||
;;
|
||||
-I)
|
||||
_filedir so
|
||||
return
|
||||
-*6*)
|
||||
ipvx=-6
|
||||
;;
|
||||
-c)
|
||||
_ssh_ciphers "$1"
|
||||
return
|
||||
;;
|
||||
-J)
|
||||
_known_hosts_real -a -F "$configfile" -- "$cur"
|
||||
return
|
||||
;;
|
||||
-m)
|
||||
_ssh_macs "$1"
|
||||
return
|
||||
;;
|
||||
-l)
|
||||
COMPREPLY=( $( compgen -u -- "$cur" ) )
|
||||
return
|
||||
;;
|
||||
-O)
|
||||
COMPREPLY=( $( compgen -W 'check forward exit stop' -- "$cur" ) )
|
||||
return
|
||||
;;
|
||||
-o)
|
||||
_ssh_options
|
||||
return
|
||||
;;
|
||||
-Q)
|
||||
_ssh_queries "$1"
|
||||
return
|
||||
;;
|
||||
-w)
|
||||
_available_interfaces
|
||||
return
|
||||
;;
|
||||
-b)
|
||||
-*b)
|
||||
_ip_addresses
|
||||
return
|
||||
;;
|
||||
-D|-e|-L|-p|-R|-W)
|
||||
-*c)
|
||||
_ssh_ciphers "$1"
|
||||
return
|
||||
;;
|
||||
-4|-6)
|
||||
ipvx=$prev
|
||||
-*[DeLpRW])
|
||||
return
|
||||
;;
|
||||
-*[EFS])
|
||||
_filedir
|
||||
return
|
||||
;;
|
||||
-*i)
|
||||
_ssh_identityfile
|
||||
return
|
||||
;;
|
||||
-*I)
|
||||
_filedir so
|
||||
return
|
||||
;;
|
||||
-*J)
|
||||
_known_hosts_real -a -F "$configfile" -- "$cur"
|
||||
return
|
||||
;;
|
||||
-*l)
|
||||
COMPREPLY=( $(compgen -u -- "$cur") )
|
||||
return
|
||||
;;
|
||||
-*m)
|
||||
_ssh_macs "$1"
|
||||
return
|
||||
;;
|
||||
-*O)
|
||||
COMPREPLY=( $(compgen -W 'check forward cancel exit stop' -- "$cur") )
|
||||
return
|
||||
;;
|
||||
-*o)
|
||||
_ssh_options "$1"
|
||||
return
|
||||
;;
|
||||
-*Q)
|
||||
_ssh_queries "$1"
|
||||
return
|
||||
;;
|
||||
-*w)
|
||||
_available_interfaces
|
||||
return
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -229,7 +315,7 @@ _ssh()
|
|||
COMPREPLY=( "${COMPREPLY[@]/#/-F}" )
|
||||
cur=-F$cur # Restore cur
|
||||
elif [[ "$cur" == -* ]]; then
|
||||
COMPREPLY=( $( compgen -W '$( _parse_usage "$1" )' -- "$cur" ) )
|
||||
COMPREPLY=( $(compgen -W '$(_parse_usage "$1")' -- "$cur") )
|
||||
else
|
||||
_known_hosts_real $ipvx -a -F "$configfile" -- "$cur"
|
||||
|
||||
|
@ -237,7 +323,7 @@ _ssh()
|
|||
_count_args
|
||||
if [[ $args -gt 1 ]]; then
|
||||
compopt -o filenames
|
||||
COMPREPLY+=( $( compgen -c -- "$cur" ) )
|
||||
COMPREPLY+=( $(compgen -c -- "$cur") )
|
||||
fi
|
||||
fi
|
||||
} &&
|
||||
|
@ -258,28 +344,39 @@ _sftp()
|
|||
local ipvx
|
||||
|
||||
case $prev in
|
||||
-b|-F|-i)
|
||||
-*4*)
|
||||
ipvx=-4
|
||||
;;
|
||||
-*6*)
|
||||
ipvx=-6
|
||||
;;
|
||||
-*[BDlPRs])
|
||||
return
|
||||
;;
|
||||
-*[bF])
|
||||
_filedir
|
||||
return
|
||||
;;
|
||||
-o)
|
||||
_ssh_options
|
||||
-*i)
|
||||
_ssh_identityfile
|
||||
return
|
||||
;;
|
||||
-c)
|
||||
-*c)
|
||||
_ssh_ciphers
|
||||
return
|
||||
;;
|
||||
-S)
|
||||
-*J)
|
||||
_known_hosts_real -a -F "$configfile" -- "$cur"
|
||||
return
|
||||
;;
|
||||
-*o)
|
||||
_ssh_options
|
||||
return
|
||||
;;
|
||||
-*S)
|
||||
_command
|
||||
return
|
||||
;;
|
||||
-B|-D|-l|-P|-R|-s)
|
||||
return
|
||||
;;
|
||||
-4|-6)
|
||||
ipvx=$prev
|
||||
;;
|
||||
esac
|
||||
|
||||
if [[ "$cur" == -F* ]]; then
|
||||
|
@ -289,7 +386,7 @@ _sftp()
|
|||
COMPREPLY=( "${COMPREPLY[@]/#/-F}" )
|
||||
cur=-F$cur # Restore cur
|
||||
elif [[ "$cur" == -* ]]; then
|
||||
COMPREPLY=( $( compgen -W '$( _parse_usage "$1" )' -- "$cur" ) )
|
||||
COMPREPLY=( $(compgen -W '$(_parse_usage "$1")' -- "$cur") )
|
||||
else
|
||||
_known_hosts_real $ipvx -a -F "$configfile" -- "$cur"
|
||||
fi
|
||||
|
@ -312,7 +409,7 @@ _scp_remote_files()
|
|||
local path=${cur#*:}
|
||||
|
||||
# unescape (3 backslashes to 1 for chars we escaped)
|
||||
path=$( command sed -e 's/\\\\\\\('$_scp_path_esc'\)/\\\1/g' <<<"$path" )
|
||||
path=$(command sed -e 's/\\\\\\\('$_scp_path_esc'\)/\\\1/g' <<<"$path")
|
||||
|
||||
# default to home dir of specified user on remote host
|
||||
if [[ -z $path ]]; then
|
||||
|
@ -322,16 +419,16 @@ _scp_remote_files()
|
|||
local files
|
||||
if [[ $1 == -d ]]; then
|
||||
# escape problematic characters; remove non-dirs
|
||||
files=$( ssh -o 'Batchmode yes' $userhost \
|
||||
files=$(ssh -o 'Batchmode yes' $userhost \
|
||||
command ls -aF1dL "$path*" 2>/dev/null | \
|
||||
command sed -e 's/'$_scp_path_esc'/\\\\\\&/g' -e '/[^\/]$/d' )
|
||||
command sed -e 's/'$_scp_path_esc'/\\\\\\&/g' -e '/[^\/]$/d')
|
||||
else
|
||||
# escape problematic characters; remove executables, aliases, pipes
|
||||
# and sockets; add space at end of file names
|
||||
files=$( ssh -o 'Batchmode yes' $userhost \
|
||||
files=$(ssh -o 'Batchmode yes' $userhost \
|
||||
command ls -aF1dL "$path*" 2>/dev/null | \
|
||||
command sed -e 's/'$_scp_path_esc'/\\\\\\&/g' -e 's/[*@|=]$//g' \
|
||||
-e 's/[^\/]$/& /g' )
|
||||
-e 's/[^\/]$/& /g')
|
||||
fi
|
||||
COMPREPLY+=( $files )
|
||||
}
|
||||
|
@ -351,10 +448,10 @@ _scp_local_files()
|
|||
fi
|
||||
|
||||
if $dirsonly ; then
|
||||
COMPREPLY+=( $( command ls -aF1dL $cur* 2>/dev/null | \
|
||||
COMPREPLY+=( $(command ls -aF1dL $cur* 2>/dev/null | \
|
||||
command sed -e "s/$_scp_path_esc/\\\\&/g" -e '/[^\/]$/d' -e "s/^/$1/") )
|
||||
else
|
||||
COMPREPLY+=( $( command ls -aF1dL $cur* 2>/dev/null | \
|
||||
COMPREPLY+=( $(command ls -aF1dL $cur* 2>/dev/null | \
|
||||
command sed -e "s/$_scp_path_esc/\\\\&/g" -e 's/[*@|=]$//g' \
|
||||
-e 's/[^\/]$/& /g' -e "s/^/$1/") )
|
||||
fi
|
||||
|
@ -378,30 +475,42 @@ _scp()
|
|||
local ipvx
|
||||
|
||||
case $prev in
|
||||
-l|-P)
|
||||
return
|
||||
-*4*)
|
||||
ipvx=-4
|
||||
;;
|
||||
-F|-i)
|
||||
_filedir
|
||||
compopt +o nospace
|
||||
return
|
||||
-*6*)
|
||||
ipvx=-6
|
||||
;;
|
||||
-c)
|
||||
-*c)
|
||||
_ssh_ciphers
|
||||
COMPREPLY=( "${COMPREPLY[@]/%/ }" )
|
||||
return
|
||||
;;
|
||||
-o)
|
||||
_ssh_options
|
||||
return
|
||||
;;
|
||||
-S)
|
||||
_command
|
||||
-*F)
|
||||
_filedir
|
||||
compopt +o nospace
|
||||
return
|
||||
;;
|
||||
-4|-6)
|
||||
ipvx=$prev
|
||||
-*i)
|
||||
_ssh_identityfile
|
||||
compopt +o nospace
|
||||
return
|
||||
;;
|
||||
-*J)
|
||||
_known_hosts_real -a -F "$configfile" -- "$cur"
|
||||
return
|
||||
;;
|
||||
-*[lP])
|
||||
return
|
||||
;;
|
||||
-*o)
|
||||
_ssh_options
|
||||
return
|
||||
;;
|
||||
-*S)
|
||||
_command
|
||||
compopt +o nospace
|
||||
return
|
||||
;;
|
||||
esac
|
||||
|
||||
|
@ -420,8 +529,8 @@ _scp()
|
|||
else
|
||||
case $cur in
|
||||
-*)
|
||||
COMPREPLY=( $( compgen -W '$( _parse_usage "${words[0]}" )' \
|
||||
-- "$cur" ) )
|
||||
COMPREPLY=( $(compgen -W '$(_parse_usage "${words[0]}")' \
|
||||
-- "$cur") )
|
||||
COMPREPLY=( "${COMPREPLY[@]/%/ }" )
|
||||
return
|
||||
;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue