xref: /dflybsd-src/contrib/tnftp/src/cmdtab.c (revision 6cdfca0376e0380bc44bd047ec7496f7d2d752f6)
1*6cdfca03SJohn Marino /*	$NetBSD: cmdtab.c,v 1.12 2013/05/05 11:17:30 lukem Exp $	*/
2*6cdfca03SJohn Marino /*	from	NetBSD: cmdtab.c,v 1.52 2012/12/22 16:57:09 christos Exp	*/
3*6cdfca03SJohn Marino 
4*6cdfca03SJohn Marino /*-
5*6cdfca03SJohn Marino  * Copyright (c) 1996-2009 The NetBSD Foundation, Inc.
6*6cdfca03SJohn Marino  * All rights reserved.
7*6cdfca03SJohn Marino  *
8*6cdfca03SJohn Marino  * This code is derived from software contributed to The NetBSD Foundation
9*6cdfca03SJohn Marino  * by Luke Mewburn.
10*6cdfca03SJohn Marino  *
11*6cdfca03SJohn Marino  * Redistribution and use in source and binary forms, with or without
12*6cdfca03SJohn Marino  * modification, are permitted provided that the following conditions
13*6cdfca03SJohn Marino  * are met:
14*6cdfca03SJohn Marino  * 1. Redistributions of source code must retain the above copyright
15*6cdfca03SJohn Marino  *    notice, this list of conditions and the following disclaimer.
16*6cdfca03SJohn Marino  * 2. Redistributions in binary form must reproduce the above copyright
17*6cdfca03SJohn Marino  *    notice, this list of conditions and the following disclaimer in the
18*6cdfca03SJohn Marino  *    documentation and/or other materials provided with the distribution.
19*6cdfca03SJohn Marino  *
20*6cdfca03SJohn Marino  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
21*6cdfca03SJohn Marino  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
22*6cdfca03SJohn Marino  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23*6cdfca03SJohn Marino  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
24*6cdfca03SJohn Marino  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
25*6cdfca03SJohn Marino  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
26*6cdfca03SJohn Marino  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
27*6cdfca03SJohn Marino  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
28*6cdfca03SJohn Marino  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
29*6cdfca03SJohn Marino  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
30*6cdfca03SJohn Marino  * POSSIBILITY OF SUCH DAMAGE.
31*6cdfca03SJohn Marino  */
32*6cdfca03SJohn Marino 
33*6cdfca03SJohn Marino /*
34*6cdfca03SJohn Marino  * Copyright (c) 1985, 1989, 1993, 1994
35*6cdfca03SJohn Marino  *	The Regents of the University of California.  All rights reserved.
36*6cdfca03SJohn Marino  *
37*6cdfca03SJohn Marino  * Redistribution and use in source and binary forms, with or without
38*6cdfca03SJohn Marino  * modification, are permitted provided that the following conditions
39*6cdfca03SJohn Marino  * are met:
40*6cdfca03SJohn Marino  * 1. Redistributions of source code must retain the above copyright
41*6cdfca03SJohn Marino  *    notice, this list of conditions and the following disclaimer.
42*6cdfca03SJohn Marino  * 2. Redistributions in binary form must reproduce the above copyright
43*6cdfca03SJohn Marino  *    notice, this list of conditions and the following disclaimer in the
44*6cdfca03SJohn Marino  *    documentation and/or other materials provided with the distribution.
45*6cdfca03SJohn Marino  * 3. Neither the name of the University nor the names of its contributors
46*6cdfca03SJohn Marino  *    may be used to endorse or promote products derived from this software
47*6cdfca03SJohn Marino  *    without specific prior written permission.
48*6cdfca03SJohn Marino  *
49*6cdfca03SJohn Marino  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
50*6cdfca03SJohn Marino  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
51*6cdfca03SJohn Marino  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
52*6cdfca03SJohn Marino  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
53*6cdfca03SJohn Marino  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
54*6cdfca03SJohn Marino  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
55*6cdfca03SJohn Marino  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
56*6cdfca03SJohn Marino  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
57*6cdfca03SJohn Marino  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
58*6cdfca03SJohn Marino  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
59*6cdfca03SJohn Marino  * SUCH DAMAGE.
60*6cdfca03SJohn Marino  */
61*6cdfca03SJohn Marino 
62*6cdfca03SJohn Marino #include "tnftp.h"
63*6cdfca03SJohn Marino 
64*6cdfca03SJohn Marino #if 0	/* tnftp */
65*6cdfca03SJohn Marino 
66*6cdfca03SJohn Marino #include <sys/cdefs.h>
67*6cdfca03SJohn Marino #ifndef lint
68*6cdfca03SJohn Marino #if 0
69*6cdfca03SJohn Marino static char sccsid[] = "@(#)cmdtab.c	8.4 (Berkeley) 10/9/94";
70*6cdfca03SJohn Marino #else
71*6cdfca03SJohn Marino __RCSID(" NetBSD: cmdtab.c,v 1.52 2012/12/22 16:57:09 christos Exp  ");
72*6cdfca03SJohn Marino #endif
73*6cdfca03SJohn Marino #endif /* not lint */
74*6cdfca03SJohn Marino 
75*6cdfca03SJohn Marino #include <stdio.h>
76*6cdfca03SJohn Marino 
77*6cdfca03SJohn Marino #endif	/* tnftp */
78*6cdfca03SJohn Marino 
79*6cdfca03SJohn Marino #include "ftp_var.h"
80*6cdfca03SJohn Marino 
81*6cdfca03SJohn Marino /*
82*6cdfca03SJohn Marino  * User FTP -- Command Tables.
83*6cdfca03SJohn Marino  */
84*6cdfca03SJohn Marino 
85*6cdfca03SJohn Marino #define HSTR	static const char
86*6cdfca03SJohn Marino 
87*6cdfca03SJohn Marino #ifndef NO_HELP
88*6cdfca03SJohn Marino HSTR	accounthelp[] =	"send account command to remote server";
89*6cdfca03SJohn Marino HSTR	appendhelp[] =	"append to a file";
90*6cdfca03SJohn Marino HSTR	asciihelp[] =	"set ascii transfer type";
91*6cdfca03SJohn Marino HSTR	beephelp[] =	"beep when command completed";
92*6cdfca03SJohn Marino HSTR	binaryhelp[] =	"set binary transfer type";
93*6cdfca03SJohn Marino HSTR	casehelp[] =	"toggle mget upper/lower case id mapping";
94*6cdfca03SJohn Marino HSTR	cdhelp[] =	"change remote working directory";
95*6cdfca03SJohn Marino HSTR	cduphelp[] =	"change remote working directory to parent directory";
96*6cdfca03SJohn Marino HSTR	chmodhelp[] =	"change file permissions of remote file";
97*6cdfca03SJohn Marino HSTR	connecthelp[] =	"connect to remote ftp server";
98*6cdfca03SJohn Marino HSTR	crhelp[] =	"toggle carriage return stripping on ascii gets";
99*6cdfca03SJohn Marino HSTR	debughelp[] =	"toggle/set debugging mode";
100*6cdfca03SJohn Marino HSTR	deletehelp[] =	"delete remote file";
101*6cdfca03SJohn Marino HSTR	disconhelp[] =	"terminate ftp session";
102*6cdfca03SJohn Marino HSTR	domachelp[] =	"execute macro";
103*6cdfca03SJohn Marino HSTR	edithelp[] =	"toggle command line editing";
104*6cdfca03SJohn Marino HSTR	epsvhelp[] =	"toggle use of EPSV/EPRT on both IPv4 and IPV6 ftp";
105*6cdfca03SJohn Marino HSTR	epsv4help[] =	"toggle use of EPSV/EPRT on IPv4 ftp";
106*6cdfca03SJohn Marino HSTR	epsv6help[] =	"toggle use of EPSV/EPRT on IPv6 ftp";
107*6cdfca03SJohn Marino HSTR	feathelp[] =	"show FEATures supported by remote system";
108*6cdfca03SJohn Marino HSTR	formhelp[] =	"set file transfer format";
109*6cdfca03SJohn Marino HSTR	gatehelp[] =	"toggle gate-ftp; specify host[:port] to change proxy";
110*6cdfca03SJohn Marino HSTR	globhelp[] =	"toggle metacharacter expansion of local file names";
111*6cdfca03SJohn Marino HSTR	hashhelp[] =	"toggle printing `#' marks; specify number to set size";
112*6cdfca03SJohn Marino HSTR	helphelp[] =	"print local help information";
113*6cdfca03SJohn Marino HSTR	idlehelp[] =	"get (set) idle timer on remote side";
114*6cdfca03SJohn Marino HSTR	lcdhelp[] =	"change local working directory";
115*6cdfca03SJohn Marino HSTR	lpagehelp[] =	"view a local file through your pager";
116*6cdfca03SJohn Marino HSTR	lpwdhelp[] =	"print local working directory";
117*6cdfca03SJohn Marino HSTR	lshelp[] =	"list contents of remote path";
118*6cdfca03SJohn Marino HSTR	macdefhelp[] =  "define a macro";
119*6cdfca03SJohn Marino HSTR	mdeletehelp[] =	"delete multiple files";
120*6cdfca03SJohn Marino HSTR	mgethelp[] =	"get multiple files";
121*6cdfca03SJohn Marino HSTR	mregethelp[] =	"get multiple files restarting at end of local file";
122*6cdfca03SJohn Marino HSTR	fgethelp[] =	"get files using a localfile as a source of names";
123*6cdfca03SJohn Marino HSTR	mkdirhelp[] =	"make directory on the remote machine";
124*6cdfca03SJohn Marino HSTR	mlshelp[] =	"list contents of multiple remote directories";
125*6cdfca03SJohn Marino HSTR	mlsdhelp[] =	"list contents of remote directory in a machine "
126*6cdfca03SJohn Marino 			"parsable form";
127*6cdfca03SJohn Marino HSTR	mlsthelp[] =	"list remote path in a machine parsable form";
128*6cdfca03SJohn Marino HSTR	modehelp[] =	"set file transfer mode";
129*6cdfca03SJohn Marino HSTR	modtimehelp[] = "show last modification time of remote file";
130*6cdfca03SJohn Marino HSTR	mputhelp[] =	"send multiple files";
131*6cdfca03SJohn Marino HSTR	newerhelp[] =	"get file if remote file is newer than local file ";
132*6cdfca03SJohn Marino HSTR	nmaphelp[] =	"set templates for default file name mapping";
133*6cdfca03SJohn Marino HSTR	ntranshelp[] =	"set translation table for default file name mapping";
134*6cdfca03SJohn Marino HSTR	optshelp[] =	"show or set options for remote commands";
135*6cdfca03SJohn Marino HSTR	pagehelp[] =	"view a remote file through your pager";
136*6cdfca03SJohn Marino HSTR	passivehelp[] =	"toggle use of passive transfer mode";
137*6cdfca03SJohn Marino HSTR	plshelp[] =	"list contents of remote path through your pager";
138*6cdfca03SJohn Marino HSTR	pmlsdhelp[] =	"list contents of remote directory in a machine "
139*6cdfca03SJohn Marino 			"parsable form through your pager";
140*6cdfca03SJohn Marino HSTR	porthelp[] =	"toggle use of PORT/LPRT cmd for each data connection";
141*6cdfca03SJohn Marino HSTR	preservehelp[] ="toggle preservation of modification time of "
142*6cdfca03SJohn Marino 			"retrieved files";
143*6cdfca03SJohn Marino HSTR	progresshelp[] ="toggle transfer progress meter";
144*6cdfca03SJohn Marino HSTR	prompthelp[] =	"force interactive prompting on multiple commands";
145*6cdfca03SJohn Marino HSTR	proxyhelp[] =	"issue command on alternate connection";
146*6cdfca03SJohn Marino HSTR	pwdhelp[] =	"print working directory on remote machine";
147*6cdfca03SJohn Marino HSTR	quithelp[] =	"terminate ftp session and exit";
148*6cdfca03SJohn Marino HSTR	quotehelp[] =	"send arbitrary ftp command";
149*6cdfca03SJohn Marino HSTR	ratehelp[] =	"set transfer rate limit (in bytes/second)";
150*6cdfca03SJohn Marino HSTR	receivehelp[] =	"receive file";
151*6cdfca03SJohn Marino HSTR	regethelp[] =	"get file restarting at end of local file";
152*6cdfca03SJohn Marino HSTR	remotehelp[] =	"get help from remote server";
153*6cdfca03SJohn Marino HSTR	renamehelp[] =	"rename file";
154*6cdfca03SJohn Marino HSTR	resethelp[] =	"clear queued command replies";
155*6cdfca03SJohn Marino HSTR	restarthelp[]=	"restart file transfer at bytecount";
156*6cdfca03SJohn Marino HSTR	rmdirhelp[] =	"remove directory on the remote machine";
157*6cdfca03SJohn Marino HSTR	rmtstatushelp[]="show status of remote machine";
158*6cdfca03SJohn Marino HSTR	runiquehelp[] = "toggle store unique for local files";
159*6cdfca03SJohn Marino HSTR	sendhelp[] =	"send one file";
160*6cdfca03SJohn Marino HSTR	sethelp[] =	"set or display options";
161*6cdfca03SJohn Marino HSTR	shellhelp[] =	"escape to the shell";
162*6cdfca03SJohn Marino HSTR	sitehelp[] =	"send site specific command to remote server\n"
163*6cdfca03SJohn Marino 			"\t\tTry \"rhelp site\" or \"site help\" "
164*6cdfca03SJohn Marino 			"for more information";
165*6cdfca03SJohn Marino HSTR	sizecmdhelp[] = "show size of remote file";
166*6cdfca03SJohn Marino HSTR	statushelp[] =	"show current status";
167*6cdfca03SJohn Marino HSTR	structhelp[] =	"set file transfer structure";
168*6cdfca03SJohn Marino HSTR	suniquehelp[] = "toggle store unique on remote machine";
169*6cdfca03SJohn Marino HSTR	systemhelp[] =  "show remote system type";
170*6cdfca03SJohn Marino HSTR	tenexhelp[] =	"set tenex file transfer type";
171*6cdfca03SJohn Marino HSTR	tracehelp[] =	"toggle packet tracing";
172*6cdfca03SJohn Marino HSTR	typehelp[] =	"set file transfer type";
173*6cdfca03SJohn Marino HSTR	umaskhelp[] =	"get (set) umask on remote side";
174*6cdfca03SJohn Marino HSTR	unsethelp[] =	"unset an option";
175*6cdfca03SJohn Marino HSTR	usagehelp[] =	"show command usage";
176*6cdfca03SJohn Marino HSTR	userhelp[] =	"send new user information";
177*6cdfca03SJohn Marino HSTR	verbosehelp[] =	"toggle verbose mode";
178*6cdfca03SJohn Marino HSTR	xferbufhelp[] =	"set socket send/receive buffer size";
179*6cdfca03SJohn Marino #endif
180*6cdfca03SJohn Marino 
181*6cdfca03SJohn Marino HSTR	empty[] = "";
182*6cdfca03SJohn Marino 
183*6cdfca03SJohn Marino #ifdef NO_HELP
184*6cdfca03SJohn Marino #define H(x)	empty
185*6cdfca03SJohn Marino #else
186*6cdfca03SJohn Marino #define H(x)	x
187*6cdfca03SJohn Marino #endif
188*6cdfca03SJohn Marino 
189*6cdfca03SJohn Marino #ifdef NO_EDITCOMPLETE
190*6cdfca03SJohn Marino #define	CMPL(x)
191*6cdfca03SJohn Marino #define	CMPL0
192*6cdfca03SJohn Marino #else  /* !NO_EDITCOMPLETE */
193*6cdfca03SJohn Marino #define	CMPL(x)	#x,
194*6cdfca03SJohn Marino #define	CMPL0	empty,
195*6cdfca03SJohn Marino #endif /* !NO_EDITCOMPLETE */
196*6cdfca03SJohn Marino 
197*6cdfca03SJohn Marino struct cmd cmdtab[] = {
198*6cdfca03SJohn Marino 	{ "!",		H(shellhelp),	0, 0, 0, CMPL0		shell },
199*6cdfca03SJohn Marino 	{ "$",		H(domachelp),	1, 0, 0, CMPL0		domacro },
200*6cdfca03SJohn Marino 	{ "account",	H(accounthelp),	0, 1, 1, CMPL0		account},
201*6cdfca03SJohn Marino 	{ "append",	H(appendhelp),	1, 1, 1, CMPL(lr)	put },
202*6cdfca03SJohn Marino 	{ "ascii",	H(asciihelp),	0, 1, 1, CMPL0		setascii },
203*6cdfca03SJohn Marino 	{ "bell",	H(beephelp),	0, 0, 0, CMPL0		setbell },
204*6cdfca03SJohn Marino 	{ "binary",	H(binaryhelp),	0, 1, 1, CMPL0		setbinary },
205*6cdfca03SJohn Marino 	{ "bye",	H(quithelp),	0, 0, 0, CMPL0		quit },
206*6cdfca03SJohn Marino 	{ "case",	H(casehelp),	0, 0, 1, CMPL0		setcase },
207*6cdfca03SJohn Marino 	{ "cd",		H(cdhelp),	0, 1, 1, CMPL(r)	cd },
208*6cdfca03SJohn Marino 	{ "cdup",	H(cduphelp),	0, 1, 1, CMPL0		cdup },
209*6cdfca03SJohn Marino 	{ "chmod",	H(chmodhelp),	0, 1, 1, CMPL(nr)	do_chmod },
210*6cdfca03SJohn Marino 	{ "close",	H(disconhelp),	0, 1, 1, CMPL0		disconnect },
211*6cdfca03SJohn Marino 	{ "cr",		H(crhelp),	0, 0, 0, CMPL0		setcr },
212*6cdfca03SJohn Marino 	{ "debug",	H(debughelp),	0, 0, 0, CMPL0		setdebug },
213*6cdfca03SJohn Marino 	{ "delete",	H(deletehelp),	0, 1, 1, CMPL(r)	delete },
214*6cdfca03SJohn Marino 	{ "dir",	H(lshelp),	1, 1, 1, CMPL(rl)	ls },
215*6cdfca03SJohn Marino 	{ "disconnect",	H(disconhelp),	0, 1, 1, CMPL0		disconnect },
216*6cdfca03SJohn Marino 	{ "edit",	H(edithelp),	0, 0, 0, CMPL0		setedit },
217*6cdfca03SJohn Marino 	{ "epsv",	H(epsvhelp),	0, 0, 0, CMPL0		setepsv },
218*6cdfca03SJohn Marino 	{ "epsv4",	H(epsv4help),	0, 0, 0, CMPL0		setepsv4 },
219*6cdfca03SJohn Marino 	{ "epsv6",	H(epsv6help),	0, 0, 0, CMPL0		setepsv6 },
220*6cdfca03SJohn Marino 	{ "exit",	H(quithelp),	0, 0, 0, CMPL0		quit },
221*6cdfca03SJohn Marino 	{ "features",	H(feathelp),	0, 1, 1, CMPL0		feat },
222*6cdfca03SJohn Marino 	{ "fget",	H(fgethelp),	1, 1, 1, CMPL(l)	fget },
223*6cdfca03SJohn Marino 	{ "form",	H(formhelp),	0, 1, 1, CMPL0		setform },
224*6cdfca03SJohn Marino 	{ "ftp",	H(connecthelp),	0, 0, 1, CMPL0		setpeer },
225*6cdfca03SJohn Marino 	{ "gate",	H(gatehelp),	0, 0, 0, CMPL0		setgate },
226*6cdfca03SJohn Marino 	{ "get",	H(receivehelp),	1, 1, 1, CMPL(rl)	get },
227*6cdfca03SJohn Marino 	{ "glob",	H(globhelp),	0, 0, 0, CMPL0		setglob },
228*6cdfca03SJohn Marino 	{ "hash",	H(hashhelp),	0, 0, 0, CMPL0		sethash },
229*6cdfca03SJohn Marino 	{ "help",	H(helphelp),	0, 0, 1, CMPL(C)	help },
230*6cdfca03SJohn Marino 	{ "idle",	H(idlehelp),	0, 1, 1, CMPL0		idlecmd },
231*6cdfca03SJohn Marino 	{ "image",	H(binaryhelp),	0, 1, 1, CMPL0		setbinary },
232*6cdfca03SJohn Marino 	{ "lcd",	H(lcdhelp),	0, 0, 0, CMPL(l)	lcd },
233*6cdfca03SJohn Marino 	{ "less",	H(pagehelp),	1, 1, 1, CMPL(r)	page },
234*6cdfca03SJohn Marino 	{ "lpage",	H(lpagehelp),	0, 0, 0, CMPL(l)	lpage },
235*6cdfca03SJohn Marino 	{ "lpwd",	H(lpwdhelp),	0, 0, 0, CMPL0		lpwd },
236*6cdfca03SJohn Marino 	{ "ls",		H(lshelp),	1, 1, 1, CMPL(rl)	ls },
237*6cdfca03SJohn Marino 	{ "macdef",	H(macdefhelp),	0, 0, 0, CMPL0		macdef },
238*6cdfca03SJohn Marino 	{ "mdelete",	H(mdeletehelp),	1, 1, 1, CMPL(R)	mdelete },
239*6cdfca03SJohn Marino 	{ "mdir",	H(mlshelp),	1, 1, 1, CMPL(R)	mls },
240*6cdfca03SJohn Marino 	{ "mget",	H(mgethelp),	1, 1, 1, CMPL(R)	mget },
241*6cdfca03SJohn Marino 	{ "mkdir",	H(mkdirhelp),	0, 1, 1, CMPL(r)	makedir },
242*6cdfca03SJohn Marino 	{ "mls",	H(mlshelp),	1, 1, 1, CMPL(R)	mls },
243*6cdfca03SJohn Marino 	{ "mlsd",	H(mlsdhelp),	1, 1, 1, CMPL(r)	ls },
244*6cdfca03SJohn Marino 	{ "mlst",	H(mlsthelp),	1, 1, 1, CMPL(r)	mlst },
245*6cdfca03SJohn Marino 	{ "mode",	H(modehelp),	0, 1, 1, CMPL0		setftmode },
246*6cdfca03SJohn Marino 	{ "modtime",	H(modtimehelp),	0, 1, 1, CMPL(r)	modtime },
247*6cdfca03SJohn Marino 	{ "more",	H(pagehelp),	1, 1, 1, CMPL(r)	page },
248*6cdfca03SJohn Marino 	{ "mput",	H(mputhelp),	1, 1, 1, CMPL(L)	mput },
249*6cdfca03SJohn Marino 	{ "mreget",	H(mregethelp),	1, 1, 1, CMPL(R)	mget },
250*6cdfca03SJohn Marino 	{ "msend",	H(mputhelp),	1, 1, 1, CMPL(L)	mput },
251*6cdfca03SJohn Marino 	{ "newer",	H(newerhelp),	1, 1, 1, CMPL(r)	newer },
252*6cdfca03SJohn Marino 	{ "nlist",	H(lshelp),	1, 1, 1, CMPL(rl)	ls },
253*6cdfca03SJohn Marino 	{ "nmap",	H(nmaphelp),	0, 0, 1, CMPL0		setnmap },
254*6cdfca03SJohn Marino 	{ "ntrans",	H(ntranshelp),	0, 0, 1, CMPL0		setntrans },
255*6cdfca03SJohn Marino 	{ "open",	H(connecthelp),	0, 0, 1, CMPL0		setpeer },
256*6cdfca03SJohn Marino 	{ "page",	H(pagehelp),	1, 1, 1, CMPL(r)	page },
257*6cdfca03SJohn Marino 	{ "passive",	H(passivehelp),	0, 0, 0, CMPL0		setpassive },
258*6cdfca03SJohn Marino 	{ "pdir",	H(plshelp),	1, 1, 1, CMPL(r)	ls },
259*6cdfca03SJohn Marino 	{ "pls",	H(plshelp),	1, 1, 1, CMPL(r)	ls },
260*6cdfca03SJohn Marino 	{ "pmlsd",	H(pmlsdhelp),	1, 1, 1, CMPL(r)	ls },
261*6cdfca03SJohn Marino 	{ "preserve",	H(preservehelp),0, 0, 0, CMPL0		setpreserve },
262*6cdfca03SJohn Marino 	{ "progress",	H(progresshelp),0, 0, 0, CMPL0		setprogress },
263*6cdfca03SJohn Marino 	{ "prompt",	H(prompthelp),	0, 0, 0, CMPL0		setprompt },
264*6cdfca03SJohn Marino 	{ "proxy",	H(proxyhelp),	0, 0, 1, CMPL(c)	doproxy },
265*6cdfca03SJohn Marino 	{ "put",	H(sendhelp),	1, 1, 1, CMPL(lr)	put },
266*6cdfca03SJohn Marino 	{ "pwd",	H(pwdhelp),	0, 1, 1, CMPL0		pwd },
267*6cdfca03SJohn Marino 	{ "quit",	H(quithelp),	0, 0, 0, CMPL0		quit },
268*6cdfca03SJohn Marino 	{ "quote",	H(quotehelp),	1, 1, 1, CMPL0		quote },
269*6cdfca03SJohn Marino 	{ "rate",	H(ratehelp),	0, 0, 0, CMPL0		setrate },
270*6cdfca03SJohn Marino 	{ "rcvbuf",	H(xferbufhelp),	0, 0, 0, CMPL0		setxferbuf },
271*6cdfca03SJohn Marino 	{ "recv",	H(receivehelp),	1, 1, 1, CMPL(rl)	get },
272*6cdfca03SJohn Marino 	{ "reget",	H(regethelp),	1, 1, 1, CMPL(rl)	reget },
273*6cdfca03SJohn Marino 	{ "remopts",	H(optshelp),	0, 1, 1, CMPL0		opts },
274*6cdfca03SJohn Marino 	{ "rename",	H(renamehelp),	0, 1, 1, CMPL(rr)	renamefile },
275*6cdfca03SJohn Marino 	{ "reset",	H(resethelp),	0, 1, 1, CMPL0		reset },
276*6cdfca03SJohn Marino 	{ "restart",	H(restarthelp),	1, 1, 1, CMPL0		restart },
277*6cdfca03SJohn Marino 	{ "rhelp",	H(remotehelp),	0, 1, 1, CMPL0		rmthelp },
278*6cdfca03SJohn Marino 	{ "rmdir",	H(rmdirhelp),	0, 1, 1, CMPL(r)	removedir },
279*6cdfca03SJohn Marino 	{ "rstatus",	H(rmtstatushelp),0, 1, 1, CMPL(r)	rmtstatus },
280*6cdfca03SJohn Marino 	{ "runique",	H(runiquehelp),	0, 0, 1, CMPL0		setrunique },
281*6cdfca03SJohn Marino 	{ "send",	H(sendhelp),	1, 1, 1, CMPL(lr)	put },
282*6cdfca03SJohn Marino 	{ "sendport",	H(porthelp),	0, 0, 0, CMPL0		setport },
283*6cdfca03SJohn Marino 	{ "set",	H(sethelp),	0, 0, 0, CMPL(o)	setoption },
284*6cdfca03SJohn Marino 	{ "site",	H(sitehelp),	0, 1, 1, CMPL0		site },
285*6cdfca03SJohn Marino 	{ "size",	H(sizecmdhelp),	1, 1, 1, CMPL(r)	sizecmd },
286*6cdfca03SJohn Marino 	{ "sndbuf",	H(xferbufhelp),	0, 0, 0, CMPL0		setxferbuf },
287*6cdfca03SJohn Marino 	{ "status",	H(statushelp),	0, 0, 1, CMPL0		status },
288*6cdfca03SJohn Marino 	{ "struct",	H(structhelp),	0, 1, 1, CMPL0		setstruct },
289*6cdfca03SJohn Marino 	{ "sunique",	H(suniquehelp),	0, 0, 1, CMPL0		setsunique },
290*6cdfca03SJohn Marino 	{ "system",	H(systemhelp),	0, 1, 1, CMPL0		syst },
291*6cdfca03SJohn Marino 	{ "tenex",	H(tenexhelp),	0, 1, 1, CMPL0		settenex },
292*6cdfca03SJohn Marino 	{ "throttle",	H(ratehelp),	0, 0, 0, CMPL0		setrate },
293*6cdfca03SJohn Marino 	{ "trace",	H(tracehelp),	0, 0, 0, CMPL0		settrace },
294*6cdfca03SJohn Marino 	{ "type",	H(typehelp),	0, 1, 1, CMPL0		settype },
295*6cdfca03SJohn Marino 	{ "umask",	H(umaskhelp),	0, 1, 1, CMPL0		do_umask },
296*6cdfca03SJohn Marino 	{ "unset",	H(unsethelp),	0, 0, 0, CMPL(o)	unsetoption },
297*6cdfca03SJohn Marino 	{ "usage",	H(usagehelp),	0, 0, 1, CMPL(C)	help },
298*6cdfca03SJohn Marino 	{ "user",	H(userhelp),	0, 1, 1, CMPL0		user },
299*6cdfca03SJohn Marino 	{ "verbose",	H(verbosehelp),	0, 0, 0, CMPL0		setverbose },
300*6cdfca03SJohn Marino 	{ "xferbuf",	H(xferbufhelp),	0, 0, 0, CMPL0		setxferbuf },
301*6cdfca03SJohn Marino 	{ "?",		H(helphelp),	0, 0, 1, CMPL(C)	help },
302*6cdfca03SJohn Marino 	{ NULL,		NULL,		0, 0, 0, CMPL0		NULL },
303*6cdfca03SJohn Marino };
304*6cdfca03SJohn Marino 
305*6cdfca03SJohn Marino struct option optiontab[] = {
306*6cdfca03SJohn Marino 	{ "anonpass",	NULL },
307*6cdfca03SJohn Marino 	{ "ftp_proxy",	NULL },
308*6cdfca03SJohn Marino 	{ "http_proxy",	NULL },
309*6cdfca03SJohn Marino 	{ "https_proxy",NULL },
310*6cdfca03SJohn Marino 	{ "no_proxy",	NULL },
311*6cdfca03SJohn Marino 	{ "pager",	NULL },
312*6cdfca03SJohn Marino 	{ "prompt",	NULL },
313*6cdfca03SJohn Marino 	{ "rprompt",	NULL },
314*6cdfca03SJohn Marino 	{ NULL,		NULL },
315*6cdfca03SJohn Marino };
316