2012-12-22 20:57:09 +04:00
|
|
|
/* $NetBSD: cmdtab.c,v 1.52 2012/12/22 16:57:09 christos Exp $ */
|
1999-10-05 05:16:11 +04:00
|
|
|
|
|
|
|
/*-
|
2009-04-12 14:18:52 +04:00
|
|
|
* Copyright (c) 1996-2009 The NetBSD Foundation, Inc.
|
1999-10-05 05:16:11 +04:00
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* This code is derived from software contributed to The NetBSD Foundation
|
|
|
|
* by Luke Mewburn.
|
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
|
|
|
|
* ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
|
|
|
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
|
|
|
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
|
|
|
|
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
|
|
|
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
|
|
|
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
|
|
|
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
|
|
|
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
|
|
|
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
* POSSIBILITY OF SUCH DAMAGE.
|
|
|
|
*/
|
1995-09-08 05:05:59 +04:00
|
|
|
|
1993-03-21 12:45:37 +03:00
|
|
|
/*
|
1994-08-25 07:47:50 +04:00
|
|
|
* Copyright (c) 1985, 1989, 1993, 1994
|
|
|
|
* The Regents of the University of California. All rights reserved.
|
1993-03-21 12:45:37 +03:00
|
|
|
*
|
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer.
|
|
|
|
* 2. Redistributions in binary form must reproduce the above copyright
|
|
|
|
* notice, this list of conditions and the following disclaimer in the
|
|
|
|
* documentation and/or other materials provided with the distribution.
|
2003-08-07 15:13:06 +04:00
|
|
|
* 3. Neither the name of the University nor the names of its contributors
|
1993-03-21 12:45:37 +03:00
|
|
|
* may be used to endorse or promote products derived from this software
|
|
|
|
* without specific prior written permission.
|
|
|
|
*
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
|
|
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
|
|
|
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
|
|
|
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
|
|
|
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
|
|
|
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
|
|
|
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
|
|
|
* SUCH DAMAGE.
|
|
|
|
*/
|
|
|
|
|
1997-07-20 13:45:35 +04:00
|
|
|
#include <sys/cdefs.h>
|
1993-03-21 12:45:37 +03:00
|
|
|
#ifndef lint
|
1995-09-08 05:05:59 +04:00
|
|
|
#if 0
|
|
|
|
static char sccsid[] = "@(#)cmdtab.c 8.4 (Berkeley) 10/9/94";
|
|
|
|
#else
|
2012-12-22 20:57:09 +04:00
|
|
|
__RCSID("$NetBSD: cmdtab.c,v 1.52 2012/12/22 16:57:09 christos Exp $");
|
1995-09-08 05:05:59 +04:00
|
|
|
#endif
|
1993-03-21 12:45:37 +03:00
|
|
|
#endif /* not lint */
|
|
|
|
|
1994-08-25 07:47:50 +04:00
|
|
|
#include <stdio.h>
|
1993-03-21 12:45:37 +03:00
|
|
|
#include "ftp_var.h"
|
|
|
|
|
|
|
|
/*
|
|
|
|
* User FTP -- Command Tables.
|
|
|
|
*/
|
|
|
|
|
2004-06-06 05:37:41 +04:00
|
|
|
#define HSTR static const char
|
|
|
|
|
|
|
|
#ifndef NO_HELP
|
|
|
|
HSTR accounthelp[] = "send account command to remote server";
|
|
|
|
HSTR appendhelp[] = "append to a file";
|
|
|
|
HSTR asciihelp[] = "set ascii transfer type";
|
|
|
|
HSTR beephelp[] = "beep when command completed";
|
|
|
|
HSTR binaryhelp[] = "set binary transfer type";
|
|
|
|
HSTR casehelp[] = "toggle mget upper/lower case id mapping";
|
|
|
|
HSTR cdhelp[] = "change remote working directory";
|
|
|
|
HSTR cduphelp[] = "change remote working directory to parent directory";
|
|
|
|
HSTR chmodhelp[] = "change file permissions of remote file";
|
|
|
|
HSTR connecthelp[] = "connect to remote ftp server";
|
|
|
|
HSTR crhelp[] = "toggle carriage return stripping on ascii gets";
|
|
|
|
HSTR debughelp[] = "toggle/set debugging mode";
|
|
|
|
HSTR deletehelp[] = "delete remote file";
|
|
|
|
HSTR disconhelp[] = "terminate ftp session";
|
|
|
|
HSTR domachelp[] = "execute macro";
|
|
|
|
HSTR edithelp[] = "toggle command line editing";
|
2008-05-10 04:05:31 +04:00
|
|
|
HSTR epsvhelp[] = "toggle use of EPSV/EPRT on both IPv4 and IPV6 ftp";
|
2004-06-06 05:37:41 +04:00
|
|
|
HSTR epsv4help[] = "toggle use of EPSV/EPRT on IPv4 ftp";
|
2008-05-10 04:05:31 +04:00
|
|
|
HSTR epsv6help[] = "toggle use of EPSV/EPRT on IPv6 ftp";
|
2004-06-06 05:37:41 +04:00
|
|
|
HSTR feathelp[] = "show FEATures supported by remote system";
|
|
|
|
HSTR formhelp[] = "set file transfer format";
|
|
|
|
HSTR gatehelp[] = "toggle gate-ftp; specify host[:port] to change proxy";
|
|
|
|
HSTR globhelp[] = "toggle metacharacter expansion of local file names";
|
|
|
|
HSTR hashhelp[] = "toggle printing `#' marks; specify number to set size";
|
|
|
|
HSTR helphelp[] = "print local help information";
|
|
|
|
HSTR idlehelp[] = "get (set) idle timer on remote side";
|
|
|
|
HSTR lcdhelp[] = "change local working directory";
|
|
|
|
HSTR lpagehelp[] = "view a local file through your pager";
|
|
|
|
HSTR lpwdhelp[] = "print local working directory";
|
|
|
|
HSTR lshelp[] = "list contents of remote path";
|
|
|
|
HSTR macdefhelp[] = "define a macro";
|
|
|
|
HSTR mdeletehelp[] = "delete multiple files";
|
|
|
|
HSTR mgethelp[] = "get multiple files";
|
|
|
|
HSTR mregethelp[] = "get multiple files restarting at end of local file";
|
|
|
|
HSTR fgethelp[] = "get files using a localfile as a source of names";
|
|
|
|
HSTR mkdirhelp[] = "make directory on the remote machine";
|
|
|
|
HSTR mlshelp[] = "list contents of multiple remote directories";
|
|
|
|
HSTR mlsdhelp[] = "list contents of remote directory in a machine "
|
add support for FEAT and OPTS commands with `features' and `opts'.
(from RFC 2389).
add support for MLST & MLSD (machine parseble listings) with 'mlst', 'mlsd'
and 'pmlsd' (mlsd |$PAGER) commands. (from draft-ietf-ftpext-mlst-11)
rename remotesyst() to getremoteinfo(), and modify to parse the result from
FEAT (if supported), and take into account the support for the various
extensions such as MDTM, SIZE, REST (STREAM), MLSD, and FEAT/OPTS.
put each feature into one of the following categories:
- known to work (explicit FEAT)
- unknown but assume works until explicit failure, when it's
then tagged as `known not to work'.
- known not to work (FEAT succeeded but didn't return anything,
or was unknown and then explicit failure)
assign results into features[] matrix.
add support to getreply() so that an optional callback will be called
for each line received from the server except for the first and last.
this is used in FEAT (and MLST) parsing.
modify various commands to check if REST (STREAM), MDTM and SIZE are
explicitly or implicitly supported before using.
fix `syst' when verbose is off.
minor knf (indent goto labels by one space, etc).
simply various command usage handlers by assuming that argv != NULL except
for quit() and disconnect().
2000-07-18 11:16:52 +04:00
|
|
|
"parsable form";
|
2004-06-06 05:37:41 +04:00
|
|
|
HSTR mlsthelp[] = "list remote path in a machine parsable form";
|
|
|
|
HSTR modehelp[] = "set file transfer mode";
|
|
|
|
HSTR modtimehelp[] = "show last modification time of remote file";
|
|
|
|
HSTR mputhelp[] = "send multiple files";
|
|
|
|
HSTR newerhelp[] = "get file if remote file is newer than local file ";
|
|
|
|
HSTR nmaphelp[] = "set templates for default file name mapping";
|
|
|
|
HSTR ntranshelp[] = "set translation table for default file name mapping";
|
|
|
|
HSTR optshelp[] = "show or set options for remote commands";
|
|
|
|
HSTR pagehelp[] = "view a remote file through your pager";
|
|
|
|
HSTR passivehelp[] = "toggle use of passive transfer mode";
|
|
|
|
HSTR plshelp[] = "list contents of remote path through your pager";
|
|
|
|
HSTR pmlsdhelp[] = "list contents of remote directory in a machine "
|
add support for FEAT and OPTS commands with `features' and `opts'.
(from RFC 2389).
add support for MLST & MLSD (machine parseble listings) with 'mlst', 'mlsd'
and 'pmlsd' (mlsd |$PAGER) commands. (from draft-ietf-ftpext-mlst-11)
rename remotesyst() to getremoteinfo(), and modify to parse the result from
FEAT (if supported), and take into account the support for the various
extensions such as MDTM, SIZE, REST (STREAM), MLSD, and FEAT/OPTS.
put each feature into one of the following categories:
- known to work (explicit FEAT)
- unknown but assume works until explicit failure, when it's
then tagged as `known not to work'.
- known not to work (FEAT succeeded but didn't return anything,
or was unknown and then explicit failure)
assign results into features[] matrix.
add support to getreply() so that an optional callback will be called
for each line received from the server except for the first and last.
this is used in FEAT (and MLST) parsing.
modify various commands to check if REST (STREAM), MDTM and SIZE are
explicitly or implicitly supported before using.
fix `syst' when verbose is off.
minor knf (indent goto labels by one space, etc).
simply various command usage handlers by assuming that argv != NULL except
for quit() and disconnect().
2000-07-18 11:16:52 +04:00
|
|
|
"parsable form through your pager";
|
2004-06-06 05:37:41 +04:00
|
|
|
HSTR porthelp[] = "toggle use of PORT/LPRT cmd for each data connection";
|
|
|
|
HSTR preservehelp[] ="toggle preservation of modification time of "
|
1998-07-26 16:58:16 +04:00
|
|
|
"retrieved files";
|
2004-06-06 05:37:41 +04:00
|
|
|
HSTR progresshelp[] ="toggle transfer progress meter";
|
|
|
|
HSTR prompthelp[] = "force interactive prompting on multiple commands";
|
|
|
|
HSTR proxyhelp[] = "issue command on alternate connection";
|
|
|
|
HSTR pwdhelp[] = "print working directory on remote machine";
|
|
|
|
HSTR quithelp[] = "terminate ftp session and exit";
|
|
|
|
HSTR quotehelp[] = "send arbitrary ftp command";
|
|
|
|
HSTR ratehelp[] = "set transfer rate limit (in bytes/second)";
|
|
|
|
HSTR receivehelp[] = "receive file";
|
|
|
|
HSTR regethelp[] = "get file restarting at end of local file";
|
|
|
|
HSTR remotehelp[] = "get help from remote server";
|
|
|
|
HSTR renamehelp[] = "rename file";
|
|
|
|
HSTR resethelp[] = "clear queued command replies";
|
|
|
|
HSTR restarthelp[]= "restart file transfer at bytecount";
|
|
|
|
HSTR rmdirhelp[] = "remove directory on the remote machine";
|
|
|
|
HSTR rmtstatushelp[]="show status of remote machine";
|
|
|
|
HSTR runiquehelp[] = "toggle store unique for local files";
|
|
|
|
HSTR sendhelp[] = "send one file";
|
|
|
|
HSTR sethelp[] = "set or display options";
|
|
|
|
HSTR shellhelp[] = "escape to the shell";
|
|
|
|
HSTR sitehelp[] = "send site specific command to remote server\n"
|
1996-12-06 05:06:46 +03:00
|
|
|
"\t\tTry \"rhelp site\" or \"site help\" "
|
|
|
|
"for more information";
|
2004-06-06 05:37:41 +04:00
|
|
|
HSTR sizecmdhelp[] = "show size of remote file";
|
|
|
|
HSTR statushelp[] = "show current status";
|
|
|
|
HSTR structhelp[] = "set file transfer structure";
|
|
|
|
HSTR suniquehelp[] = "toggle store unique on remote machine";
|
|
|
|
HSTR systemhelp[] = "show remote system type";
|
|
|
|
HSTR tenexhelp[] = "set tenex file transfer type";
|
|
|
|
HSTR tracehelp[] = "toggle packet tracing";
|
|
|
|
HSTR typehelp[] = "set file transfer type";
|
|
|
|
HSTR umaskhelp[] = "get (set) umask on remote side";
|
|
|
|
HSTR unsethelp[] = "unset an option";
|
|
|
|
HSTR usagehelp[] = "show command usage";
|
|
|
|
HSTR userhelp[] = "send new user information";
|
|
|
|
HSTR verbosehelp[] = "toggle verbose mode";
|
|
|
|
HSTR xferbufhelp[] = "set socket send/receive buffer size";
|
|
|
|
#endif
|
|
|
|
|
|
|
|
HSTR empty[] = "";
|
|
|
|
|
|
|
|
#ifdef NO_HELP
|
|
|
|
#define H(x) empty
|
|
|
|
#else
|
|
|
|
#define H(x) x
|
|
|
|
#endif
|
1993-03-21 12:45:37 +03:00
|
|
|
|
1999-06-21 02:07:28 +04:00
|
|
|
#ifdef NO_EDITCOMPLETE
|
1999-10-24 16:31:36 +04:00
|
|
|
#define CMPL(x)
|
|
|
|
#define CMPL0
|
1999-06-21 02:07:28 +04:00
|
|
|
#else /* !NO_EDITCOMPLETE */
|
2000-09-14 17:48:33 +04:00
|
|
|
#define CMPL(x) #x,
|
2005-04-11 05:49:31 +04:00
|
|
|
#define CMPL0 empty,
|
1999-06-21 02:07:28 +04:00
|
|
|
#endif /* !NO_EDITCOMPLETE */
|
1997-01-19 17:19:02 +03:00
|
|
|
|
1993-03-21 12:45:37 +03:00
|
|
|
struct cmd cmdtab[] = {
|
2004-06-06 05:37:41 +04:00
|
|
|
{ "!", H(shellhelp), 0, 0, 0, CMPL0 shell },
|
|
|
|
{ "$", H(domachelp), 1, 0, 0, CMPL0 domacro },
|
|
|
|
{ "account", H(accounthelp), 0, 1, 1, CMPL0 account},
|
|
|
|
{ "append", H(appendhelp), 1, 1, 1, CMPL(lr) put },
|
|
|
|
{ "ascii", H(asciihelp), 0, 1, 1, CMPL0 setascii },
|
|
|
|
{ "bell", H(beephelp), 0, 0, 0, CMPL0 setbell },
|
|
|
|
{ "binary", H(binaryhelp), 0, 1, 1, CMPL0 setbinary },
|
|
|
|
{ "bye", H(quithelp), 0, 0, 0, CMPL0 quit },
|
|
|
|
{ "case", H(casehelp), 0, 0, 1, CMPL0 setcase },
|
|
|
|
{ "cd", H(cdhelp), 0, 1, 1, CMPL(r) cd },
|
|
|
|
{ "cdup", H(cduphelp), 0, 1, 1, CMPL0 cdup },
|
|
|
|
{ "chmod", H(chmodhelp), 0, 1, 1, CMPL(nr) do_chmod },
|
|
|
|
{ "close", H(disconhelp), 0, 1, 1, CMPL0 disconnect },
|
|
|
|
{ "cr", H(crhelp), 0, 0, 0, CMPL0 setcr },
|
2007-04-11 08:40:19 +04:00
|
|
|
{ "debug", H(debughelp), 0, 0, 0, CMPL0 setdebug },
|
2004-06-06 05:37:41 +04:00
|
|
|
{ "delete", H(deletehelp), 0, 1, 1, CMPL(r) delete },
|
|
|
|
{ "dir", H(lshelp), 1, 1, 1, CMPL(rl) ls },
|
|
|
|
{ "disconnect", H(disconhelp), 0, 1, 1, CMPL0 disconnect },
|
|
|
|
{ "edit", H(edithelp), 0, 0, 0, CMPL0 setedit },
|
2008-05-10 04:05:31 +04:00
|
|
|
{ "epsv", H(epsvhelp), 0, 0, 0, CMPL0 setepsv },
|
2004-06-06 05:37:41 +04:00
|
|
|
{ "epsv4", H(epsv4help), 0, 0, 0, CMPL0 setepsv4 },
|
2008-05-10 04:05:31 +04:00
|
|
|
{ "epsv6", H(epsv6help), 0, 0, 0, CMPL0 setepsv6 },
|
2004-06-06 05:37:41 +04:00
|
|
|
{ "exit", H(quithelp), 0, 0, 0, CMPL0 quit },
|
|
|
|
{ "features", H(feathelp), 0, 1, 1, CMPL0 feat },
|
|
|
|
{ "fget", H(fgethelp), 1, 1, 1, CMPL(l) fget },
|
|
|
|
{ "form", H(formhelp), 0, 1, 1, CMPL0 setform },
|
|
|
|
{ "ftp", H(connecthelp), 0, 0, 1, CMPL0 setpeer },
|
|
|
|
{ "gate", H(gatehelp), 0, 0, 0, CMPL0 setgate },
|
|
|
|
{ "get", H(receivehelp), 1, 1, 1, CMPL(rl) get },
|
|
|
|
{ "glob", H(globhelp), 0, 0, 0, CMPL0 setglob },
|
|
|
|
{ "hash", H(hashhelp), 0, 0, 0, CMPL0 sethash },
|
2004-07-15 12:50:10 +04:00
|
|
|
{ "help", H(helphelp), 0, 0, 1, CMPL(C) help },
|
2004-06-06 05:37:41 +04:00
|
|
|
{ "idle", H(idlehelp), 0, 1, 1, CMPL0 idlecmd },
|
|
|
|
{ "image", H(binaryhelp), 0, 1, 1, CMPL0 setbinary },
|
|
|
|
{ "lcd", H(lcdhelp), 0, 0, 0, CMPL(l) lcd },
|
|
|
|
{ "less", H(pagehelp), 1, 1, 1, CMPL(r) page },
|
|
|
|
{ "lpage", H(lpagehelp), 0, 0, 0, CMPL(l) lpage },
|
|
|
|
{ "lpwd", H(lpwdhelp), 0, 0, 0, CMPL0 lpwd },
|
|
|
|
{ "ls", H(lshelp), 1, 1, 1, CMPL(rl) ls },
|
|
|
|
{ "macdef", H(macdefhelp), 0, 0, 0, CMPL0 macdef },
|
|
|
|
{ "mdelete", H(mdeletehelp), 1, 1, 1, CMPL(R) mdelete },
|
|
|
|
{ "mdir", H(mlshelp), 1, 1, 1, CMPL(R) mls },
|
|
|
|
{ "mget", H(mgethelp), 1, 1, 1, CMPL(R) mget },
|
|
|
|
{ "mkdir", H(mkdirhelp), 0, 1, 1, CMPL(r) makedir },
|
|
|
|
{ "mls", H(mlshelp), 1, 1, 1, CMPL(R) mls },
|
|
|
|
{ "mlsd", H(mlsdhelp), 1, 1, 1, CMPL(r) ls },
|
|
|
|
{ "mlst", H(mlsthelp), 1, 1, 1, CMPL(r) mlst },
|
|
|
|
{ "mode", H(modehelp), 0, 1, 1, CMPL0 setftmode },
|
|
|
|
{ "modtime", H(modtimehelp), 0, 1, 1, CMPL(r) modtime },
|
|
|
|
{ "more", H(pagehelp), 1, 1, 1, CMPL(r) page },
|
|
|
|
{ "mput", H(mputhelp), 1, 1, 1, CMPL(L) mput },
|
|
|
|
{ "mreget", H(mregethelp), 1, 1, 1, CMPL(R) mget },
|
|
|
|
{ "msend", H(mputhelp), 1, 1, 1, CMPL(L) mput },
|
|
|
|
{ "newer", H(newerhelp), 1, 1, 1, CMPL(r) newer },
|
|
|
|
{ "nlist", H(lshelp), 1, 1, 1, CMPL(rl) ls },
|
|
|
|
{ "nmap", H(nmaphelp), 0, 0, 1, CMPL0 setnmap },
|
|
|
|
{ "ntrans", H(ntranshelp), 0, 0, 1, CMPL0 setntrans },
|
|
|
|
{ "open", H(connecthelp), 0, 0, 1, CMPL0 setpeer },
|
|
|
|
{ "page", H(pagehelp), 1, 1, 1, CMPL(r) page },
|
|
|
|
{ "passive", H(passivehelp), 0, 0, 0, CMPL0 setpassive },
|
|
|
|
{ "pdir", H(plshelp), 1, 1, 1, CMPL(r) ls },
|
|
|
|
{ "pls", H(plshelp), 1, 1, 1, CMPL(r) ls },
|
|
|
|
{ "pmlsd", H(pmlsdhelp), 1, 1, 1, CMPL(r) ls },
|
|
|
|
{ "preserve", H(preservehelp),0, 0, 0, CMPL0 setpreserve },
|
|
|
|
{ "progress", H(progresshelp),0, 0, 0, CMPL0 setprogress },
|
|
|
|
{ "prompt", H(prompthelp), 0, 0, 0, CMPL0 setprompt },
|
|
|
|
{ "proxy", H(proxyhelp), 0, 0, 1, CMPL(c) doproxy },
|
|
|
|
{ "put", H(sendhelp), 1, 1, 1, CMPL(lr) put },
|
|
|
|
{ "pwd", H(pwdhelp), 0, 1, 1, CMPL0 pwd },
|
|
|
|
{ "quit", H(quithelp), 0, 0, 0, CMPL0 quit },
|
|
|
|
{ "quote", H(quotehelp), 1, 1, 1, CMPL0 quote },
|
|
|
|
{ "rate", H(ratehelp), 0, 0, 0, CMPL0 setrate },
|
|
|
|
{ "rcvbuf", H(xferbufhelp), 0, 0, 0, CMPL0 setxferbuf },
|
|
|
|
{ "recv", H(receivehelp), 1, 1, 1, CMPL(rl) get },
|
|
|
|
{ "reget", H(regethelp), 1, 1, 1, CMPL(rl) reget },
|
|
|
|
{ "remopts", H(optshelp), 0, 1, 1, CMPL0 opts },
|
|
|
|
{ "rename", H(renamehelp), 0, 1, 1, CMPL(rr) renamefile },
|
|
|
|
{ "reset", H(resethelp), 0, 1, 1, CMPL0 reset },
|
|
|
|
{ "restart", H(restarthelp), 1, 1, 1, CMPL0 restart },
|
2004-07-15 12:50:10 +04:00
|
|
|
{ "rhelp", H(remotehelp), 0, 1, 1, CMPL0 rmthelp },
|
2004-06-06 05:37:41 +04:00
|
|
|
{ "rmdir", H(rmdirhelp), 0, 1, 1, CMPL(r) removedir },
|
|
|
|
{ "rstatus", H(rmtstatushelp),0, 1, 1, CMPL(r) rmtstatus },
|
|
|
|
{ "runique", H(runiquehelp), 0, 0, 1, CMPL0 setrunique },
|
|
|
|
{ "send", H(sendhelp), 1, 1, 1, CMPL(lr) put },
|
|
|
|
{ "sendport", H(porthelp), 0, 0, 0, CMPL0 setport },
|
|
|
|
{ "set", H(sethelp), 0, 0, 0, CMPL(o) setoption },
|
|
|
|
{ "site", H(sitehelp), 0, 1, 1, CMPL0 site },
|
|
|
|
{ "size", H(sizecmdhelp), 1, 1, 1, CMPL(r) sizecmd },
|
|
|
|
{ "sndbuf", H(xferbufhelp), 0, 0, 0, CMPL0 setxferbuf },
|
|
|
|
{ "status", H(statushelp), 0, 0, 1, CMPL0 status },
|
|
|
|
{ "struct", H(structhelp), 0, 1, 1, CMPL0 setstruct },
|
|
|
|
{ "sunique", H(suniquehelp), 0, 0, 1, CMPL0 setsunique },
|
|
|
|
{ "system", H(systemhelp), 0, 1, 1, CMPL0 syst },
|
|
|
|
{ "tenex", H(tenexhelp), 0, 1, 1, CMPL0 settenex },
|
|
|
|
{ "throttle", H(ratehelp), 0, 0, 0, CMPL0 setrate },
|
|
|
|
{ "trace", H(tracehelp), 0, 0, 0, CMPL0 settrace },
|
|
|
|
{ "type", H(typehelp), 0, 1, 1, CMPL0 settype },
|
|
|
|
{ "umask", H(umaskhelp), 0, 1, 1, CMPL0 do_umask },
|
|
|
|
{ "unset", H(unsethelp), 0, 0, 0, CMPL(o) unsetoption },
|
|
|
|
{ "usage", H(usagehelp), 0, 0, 1, CMPL(C) help },
|
|
|
|
{ "user", H(userhelp), 0, 1, 1, CMPL0 user },
|
|
|
|
{ "verbose", H(verbosehelp), 0, 0, 0, CMPL0 setverbose },
|
|
|
|
{ "xferbuf", H(xferbufhelp), 0, 0, 0, CMPL0 setxferbuf },
|
|
|
|
{ "?", H(helphelp), 0, 0, 1, CMPL(C) help },
|
2009-04-12 14:18:52 +04:00
|
|
|
{ NULL, NULL, 0, 0, 0, CMPL0 NULL },
|
1993-03-21 12:45:37 +03:00
|
|
|
};
|
|
|
|
|
1999-10-24 16:31:36 +04:00
|
|
|
struct option optiontab[] = {
|
|
|
|
{ "anonpass", NULL },
|
|
|
|
{ "ftp_proxy", NULL },
|
|
|
|
{ "http_proxy", NULL },
|
2012-12-22 20:57:09 +04:00
|
|
|
{ "https_proxy",NULL },
|
1999-10-24 16:31:36 +04:00
|
|
|
{ "no_proxy", NULL },
|
|
|
|
{ "pager", NULL },
|
1999-11-11 05:53:02 +03:00
|
|
|
{ "prompt", NULL },
|
1999-11-12 05:50:38 +03:00
|
|
|
{ "rprompt", NULL },
|
2009-04-12 14:18:52 +04:00
|
|
|
{ NULL, NULL },
|
1999-10-24 16:31:36 +04:00
|
|
|
};
|