3 * Copyright (c) 1992-2001 by Mike Gleason.
13 /* These will be sorted lexiographically when the program is run, but
14 * they should already be listed that way.
16 Command gCommands
[] = {
17 #if defined(WIN32) || defined(_WINDOWS)
29 "[optional commands]",
30 "shows commands, or detailed help on specified commands",
37 "sets the file transfer type to ASCII text",
43 "[-flags] file1 [file2...]\n\
45 -R : Recursive. Useful for fetching whole directories.\n\
46 -z : Get the remote file X, and name it to Y.\n\
47 -@ <time> : Wait until <time> to do the transfer.\n\
48 It must be expressed as one of the following:\n\
50 \"now + N hours|min|sec|days\"\n\
52 "collects items to download later from the remote host",
53 kCmdMustBeConnected
| kCompleteRemoteFile
,
58 "[-flags] file1 [file2...]\n\
60 -z : Send the local file X, and name the remote copy to Y.\n\
61 -R : Recursive. Useful for sending whole directories.\n\
62 -@ <time> : Wait until <time> to do the transfer.\n\
63 It must be expressed as one of the following:\n\
65 \"now + N hours|min|sec|days\"\n\
67 "collects items to upload later to the remote host",
68 kCmdMustBeConnected
| kCompleteLocalFile
,
74 "starts a ncftpbatch process to process spooled files",
81 "sets the file transfer type to binary/image",
87 "[bookmark-name-to-save-as]",
88 "Creates or updates a bookmark using the current host and directory",
89 kCmdMustBeConnected
| kCompleteBookmark
,
95 "lets you edit the settings for each bookmark",
109 "views a file from the remote host",
110 kCmdMustBeConnected
| kCompleteRemoteFile
,
116 "changes remote working directory",
117 kCmdMustBeConnected
| kCompleteRemoteDir
,
122 "mode file1 [file2...]",
123 "changes permissions for files on the remote host",
124 kCmdMustBeConnected
| kCompleteRemoteFile
,
130 "closes the connection to the remote host",
137 "sets debug mode to level x",
144 "deletes files from the remote host",
145 kCmdMustBeConnected
| kCmdHidden
| kCompleteRemoteFile
,
151 "prints a verbose directory listing",
152 kCmdMustBeConnected
| kCompleteRemoteDir
,
158 "echos back to screen",
171 "[-flags] file1 [file2...]\n\
173 -R : Recursive. Useful for fetching whole directories.\n\
174 -z : Get the remote file X, and name it to Y.\n\
175 -a : Get files using ASCII mode.\n\
176 -A : Append entire remote file to the local file.\n\
177 -f : Force overwrite (do not try to auto-resume transfers).\n\
181 get \"**Name with stars and spaces in it**\"\n\
182 get -R new-files-directory\n\
183 get -z WIN.INI ~/junk/windows-init-file",
184 "fetches files from the remote host",
185 kCmdMustBeConnected
| kCompleteRemoteFile
,
190 "[optional commands]",
191 "shows commands, or detailed help on specified commands",
198 "lets you edit the settings for each remote host",
199 kCmdMustBeDisconnected
| kCmdHidden
,
202 #if defined(WIN32) || defined(_WINDOWS)
207 "shows status of background NcFTP tasks",
215 "changes local working directory",
219 #if defined(WIN32) || defined(_WINDOWS)
223 "mode file1 [file2...]",
224 "changes permissions for files on the local host",
225 kCompleteLocalFile
| kCompleteLocalDir
,
232 "views a file from the remote host one page at a time.",
233 kCmdMustBeConnected
| kCmdHidden
| kCompleteRemoteFile
,
239 "prints a local directory listing",
244 (CmdProc
) LocalMkdirCmd
,
246 "creates directories on the local host",
252 "<host or IP number> [<more hosts or IP numbers>]",
253 "looks up information in the host database",
257 #if defined(WIN32) || defined(_WINDOWS)
262 "views a file on the local host one page at a time.",
268 (CmdProc
) LocalPwdCmd
,
270 "Prints the current local working directory",
277 "changes the name of a file on the local host",
278 kCompleteLocalFile
| kCompleteLocalDir
,
282 (CmdProc
) LocalRmCmd
,
284 "removes files on the local host",
285 kCompleteLocalFile
| kCompleteLocalDir
,
289 (CmdProc
) LocalRmdirCmd
,
291 "removes directories on the local host",
298 "prints a remote directory listing",
299 kCmdMustBeConnected
| kCompleteRemoteDir
,
304 "[-flags] file1 [file2...]\n\
306 -R : Recursive. Useful for fetching whole directories.\n\
307 -z : Get the remote file X, and name it to Y.\n\
308 -a : Get files using ASCII mode.\n\
309 -A : Append entire remote file to the local file.\n\
310 -f : Force overwrite (do not try to auto-resume transfers).\n\
314 get \"**Name with stars and spaces in it**\"\n\
315 get -R new-files-directory\n\
316 get -z WIN.INI ~/junk/windows-init-file",
317 "fetches files from the remote host",
318 kCmdMustBeConnected
| kCmdHidden
| kCompleteRemoteFile
,
324 "creates directories on the remote host",
330 "[<directory to list> | -d <single item to list>]",
331 "prints a machine-readable directory listing",
332 kCmdMustBeConnected
| kCompleteRemoteDir
| kCmdHidden
,
338 "views a file from the remote host one page at a time.",
339 kCmdMustBeConnected
| kCmdHidden
| kCompleteRemoteFile
,
344 "[-flags] file1 [file2...]\n\
346 -z : Send the local file X, and name the remote copy to Y.\n\
347 -f : Force overwrite (do not try to auto-resume transfers).\n\
348 -a : Send files using ASCII mode.\n\
349 -A : Append entire local file to the remote file.\n\
350 -R : Recursive. Useful for sending whole directories.\n\
353 put -z ~/junk/windows-init-file WIN.INI",
354 "sends files to the remote host",
355 kCmdMustBeConnected
| kCompleteLocalFile
| kCmdHidden
,
361 "views a file from the remote host one page at a time.",
362 kCmdMustBeConnected
| kCompleteRemoteFile
,
367 "[-flags] [sitename]\n\
369 -a : Open anonymously.\n\
370 -u XX : Login with username XX.\n\
371 -p XX : Login with password XX.\n\
372 -j XX : Login with account XX.\n\
373 -P XX : Use port number X when opening.\n\
375 open sphygmomanometer.unl.edu\n\
376 open -u mario bowser.nintendo.co.jp\n",
377 "connects to a remote host",
384 "views a directory listing through your pager",
385 kCmdMustBeConnected
| kCompleteRemoteDir
,
391 "views a directory listing through your pager",
392 kCmdMustBeConnected
| kCompleteRemoteDir
,
398 "shows the program's settings",
404 "[-flags] file1 [file2...]\n\
406 -z : Send the local file X, and name the remote copy to Y.\n\
407 -f : Force overwrite (do not try to auto-resume transfers).\n\
408 -a : Send files using ASCII mode.\n\
409 -A : Append entire local file to the remote file.\n\
410 -R : Recursive. Useful for sending whole directories.\n\
413 put -z ~/junk/windows-init-file WIN.INI",
414 "sends a file to the remote host",
415 kCmdMustBeConnected
| kCompleteLocalFile
,
421 "Prints the current remote working directory",
435 "sends an FTP command to the remote server",
442 "changes the name of a file on the remote host",
443 kCmdMustBeConnected
| kCompleteRemoteFile
,
449 "tests remote filename wildcard matching",
450 kCmdMustBeConnected
| kCmdHidden
,
456 "requests help from the remote server",
462 "[-r] file1 [file2...]",
463 "deletes files from the remote host",
464 kCmdMustBeConnected
| kCompleteRemoteFile
,
470 "deletes directories from the remote host",
471 kCmdMustBeConnected
| kCompleteRemoteDir
,
476 "[option [newvalue]]",
477 "lets you configure a program setting from the command line",
484 "shows one or more the program's settings",
491 "sends a host-specific FTP command to the remote server",
497 "existing-item link-item",
498 "creates a symbolic link on the remote host",
499 kCmdHidden
| kCmdMustBeConnected
| kCompleteRemoteFile
,
504 "[ascii | binary | image]",
505 "sets file transfer type (one of 'ascii' or 'binary')",
512 "sets the process umask on remote host",
517 (CmdProc
) VersionCmd
,
519 "prints version information",
525 size_t gNumCommands
= ((size_t) (sizeof(gCommands
) / sizeof(Command
)));