"\n DIR Change root to this directory" \
#define ftpget_trivial_usage \
- "[OPTIONS] HOST LOCAL_FILE REMOTE_FILE"
+ "[OPTIONS] HOST [LOCAL_FILE] REMOTE_FILE"
#define ftpget_full_usage "\n\n" \
"Retrieve a remote file via FTP\n" \
"\nOptions:" \
)
#define ftpput_trivial_usage \
- "[OPTIONS] HOST REMOTE_FILE LOCAL_FILE"
+ "[OPTIONS] HOST [REMOTE_FILE] LOCAL_FILE"
#define ftpput_full_usage "\n\n" \
"Store a local file on a remote machine via FTP\n" \
"\nOptions:" \
#if ENABLE_FEATURE_FTPGETPUT_LONG_OPTIONS
applet_long_options = ftpgetput_longopts;
#endif
- opt_complementary = "=3:vv:cc"; /* must have 3 params; -v and -c count */
+ opt_complementary = "-2:vv:cc"; /* must have 2 to 3 params; -v and -c count */
opt = getopt32(argv, "cvu:p:P:", &user, &password, &port,
&verbose_flag, &do_continue);
argv += optind;
}
ftp_login();
- return ftp_action(argv[1], argv[2]);
+ return ftp_action(argv[1], argv[2] ? argv[2] : argv[1]);
}