@@ -332,10 +332,10 @@ void process_commands() {
332
332
333
333
// crypto subcommands
334
334
auto start_crypto_cmd = crypto_cmd->add_subcommand (" start" , " Start crypto" );
335
- std::string crypto_arg ;
336
- start_crypto_cmd->add_option (" arg " , crypto_arg , " Crypto argument " )
335
+ std::string start_crypto_pwd ;
336
+ start_crypto_cmd->add_option (" password " , start_crypto_pwd , " Crypto password " )
337
337
->required ();
338
- start_crypto_cmd->callback ([&] { start_crypto (crypto_arg .c_str ()); });
338
+ start_crypto_cmd->callback ([&] { start_crypto (start_crypto_pwd .c_str ()); });
339
339
340
340
crypto_cmd->add_subcommand (" stop" , " Stop crypto" )->callback (stop_crypto);
341
341
@@ -345,22 +345,22 @@ void process_commands() {
345
345
->callback (list_sync_folders);
346
346
347
347
auto sync_add_cmd = sync_cmd->add_subcommand (" add" , " Add sync folder" );
348
- std::string syncadd_arg;
349
- sync_add_cmd->add_option (" arg" , syncadd_arg, " Paths" )->required ();
348
+ std::string syncadd_lpath, syncadd_rpath;
349
+ sync_add_cmd->add_option (" localpath" , syncadd_lpath, " Local Path" )->required ();
350
+ sync_add_cmd->add_option (" remotepath" , syncadd_rpath, " Remote Path" )->required ();
350
351
sync_add_cmd->callback ([&] {
351
- auto [lpath, rpath] = split_paths (syncadd_arg.c_str ());
352
- add_sync_folder (lpath, rpath);
352
+ add_sync_folder (syncadd_lpath, syncadd_rpath);
353
353
});
354
354
355
355
auto sync_remove_cmd =
356
- sync_cmd->add_subcommand (" remove" , " Remove sync folder" )->alias (" rm" );
357
- std::string syncrm_arg ;
358
- sync_remove_cmd->add_option (" arg " , syncrm_arg , " Path " )->required ();
359
- sync_remove_cmd->callback ([&] { remove_sync_folder (syncrm_arg .c_str ()); });
356
+ sync_cmd->add_subcommand (" remove" , " Remove sync folder (use ls to get folder ID) " )->alias (" rm" );
357
+ std::string syncrm_fid ;
358
+ sync_remove_cmd->add_option (" folderid " , syncrm_fid , " Folder ID " )->required ();
359
+ sync_remove_cmd->callback ([&] { remove_sync_folder (syncrm_fid .c_str ()); });
360
360
361
361
// command loop
362
362
while (true ) {
363
- std::cout << " > " ;
363
+ std::cout << " pcloud > " ;
364
364
std::string line;
365
365
if (!std::getline (std::cin, line))
366
366
break ;
0 commit comments