diff options
author | Oliver Kiddle <opk@users.sourceforge.net> | 2012-11-07 20:59:09 +0000 |
---|---|---|
committer | Oliver Kiddle <opk@users.sourceforge.net> | 2012-11-07 20:59:09 +0000 |
commit | a8ffff2cb774a83584e4467b14c41517973c5468 (patch) | |
tree | 031a6e65745de48685d9e08269281828016a9a81 /Completion/Unix/Type/_urls | |
parent | cd0c6153e0cae68d06a052ea84f3a965c25dde98 (diff) | |
download | zsh-a8ffff2cb774a83584e4467b14c41517973c5468.tar.gz zsh-a8ffff2cb774a83584e4467b14c41517973c5468.tar.xz zsh-a8ffff2cb774a83584e4467b14c41517973c5468.zip |
users/17382: complete URLs for vim and make _remote_files more
consistent with _files
Diffstat (limited to 'Completion/Unix/Type/_urls')
-rw-r--r-- | Completion/Unix/Type/_urls | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Completion/Unix/Type/_urls b/Completion/Unix/Type/_urls index b53f5a040..97b1a4402 100644 --- a/Completion/Unix/Type/_urls +++ b/Completion/Unix/Type/_urls @@ -75,7 +75,7 @@ fi scheme="$match[1]" case "$scheme" in - http(|s)|ftp|gopher) + http(|s)|(|s)ftp|scp|gopher) if ! compset -P //; then _wanted -C "$scheme" prefixes expl 'end of prefix' compadd -S '' "$@" // return @@ -143,7 +143,7 @@ host="$match[1]" # Complete part after hostname -_tags -C local files || return 1 +_tags remote-files files || return 1 if [[ "$localhttp_servername" = "$host" ]]; then if compset -P \~; then @@ -170,10 +170,12 @@ if [[ "$localhttp_servername" = "$host" ]]; then fi else while _tags; do - while _next_label files expl 'local file'; do + (( $#urls )) && while _next_label files expl 'local file'; do _path_files "$expl[@]" "$@" -W $urls/$scheme/$host "${glob[@]}" && ret=0 _path_files -S/ -r '/' "$expl[@]" -W $urls/$scheme/$host -/ && ret=0 done + [[ $scheme = (scp|sftp) ]] && _requested remote-files && + _remote_files -h $host -- ssh && ret=0 (( ret )) || return 0 done fi |