| 1 |
#compdef lftp |
| 2 |
|
| 3 |
__site() { |
| 4 |
local bookmarks=$(lftp -c 'bookmark list') |
| 5 |
_alternative 'hosts: :_hosts' 'urls: :_urls' "bookmarks:bookmark:((${bookmarks//$'\t'/:}))" |
| 6 |
} |
| 7 |
|
| 8 |
_arguments -S -s \ |
| 9 |
"-f[execute commands from the file and exit]: :_files" \ |
| 10 |
"-c[execute the commands and exit]:command" \ |
| 11 |
"--norc[don't execute rc files from the home directory]" \ |
| 12 |
"(- : *)--help[print this help and exit]" \ |
| 13 |
"--version[print lftp version and exit]" \ |
| 14 |
"-e[execute the command just after selecting]" \ |
| 15 |
"-u[use the user/password for authentication]: :_users" \ |
| 16 |
"-p[use the port for connection]:port" \ |
| 17 |
"-s[assign the connection to this slot]:slot" \ |
| 18 |
"-d[switch on debugging mode]" \ |
| 19 |
"1:host name, URL or bookmark name:__site" |