From: Mike Gelfand Date: Sat, 5 Mar 2016 17:27:40 +0000 (+0000) Subject: #5743: Use `-rad` as short form of `--remove-and-delete` X-Git-Tag: 2.91~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e7a16ead265b22f5f08e7189125ccaaf0e97d3df;p=transmission #5743: Use `-rad` as short form of `--remove-and-delete` --- diff --git a/daemon/remote.c b/daemon/remote.c index ea9e1cbf0..5e21afdcb 100644 --- a/daemon/remote.c +++ b/daemon/remote.c @@ -274,7 +274,7 @@ static tr_option opts[] = { 600, "reannounce", "Reannounce the current torrent(s)", NULL, 0, NULL }, { 'r', "remove", "Remove the current torrent(s)", "r", 0, NULL }, { 930, "peers", "Set the maximum number of peers for the current torrent(s) or globally", "pr", 1, "" }, - { 'R', "remove-and-delete", "Remove the current torrent(s) and delete local data", NULL, 0, NULL }, + { 840, "remove-and-delete", "Remove the current torrent(s) and delete local data", "rad", 0, NULL }, { 800, "torrent-done-script", "Specify a script to run when a torrent finishes", NULL, 1, "" }, { 801, "no-torrent-done-script", "Don't run a script when torrents finish", NULL, 0, NULL }, { 950, "seedratio", "Let the current torrent(s) seed until a specific ratio", "sr", 1, "ratio" }, @@ -471,7 +471,7 @@ getOptMode (int val) return MODE_PORT_TEST; case 'r': /* remove */ - case 'R': /* remove and delete */ + case 840: /* remove and delete */ return MODE_TORRENT_REMOVE; case 960: /* move */ @@ -2277,14 +2277,14 @@ processArgs (const char * rpcurl, int argc, const char * const * argv) break; } case 'r': - case 'R': + case 840: { tr_variant * args; tr_variant * top = tr_new0 (tr_variant, 1); tr_variantInitDict (top, 2); tr_variantDictAddStr (top, TR_KEY_method, "torrent-remove"); args = tr_variantDictAddDict (top, ARGUMENTS, 2); - tr_variantDictAddBool (args, TR_KEY_delete_local_data, c=='R'); + tr_variantDictAddBool (args, TR_KEY_delete_local_data, c == 840); addIdArg (args, id, NULL); status |= flush (rpcurl, &top); break; diff --git a/daemon/transmission-remote.1 b/daemon/transmission-remote.1 index c5c5653e2..8e05de164 100644 --- a/daemon/transmission-remote.1 +++ b/daemon/transmission-remote.1 @@ -50,7 +50,7 @@ and .Op Fl pn Ar files .Op Fl pr Ar peers .Op Fl r -.Op Fl R +.Op Fl rad .Op Fl s | S .Op Fl sr Ar ratio .Op Fl SR @@ -229,7 +229,7 @@ Set the maximum number of peers. If current torrent(s) are selected this operates on them. Otherwise, it changes the global setting. .It Fl r Fl -remove Remove the current torrent(s). This does not delete the downloaded data. -.It Fl -remove-and-delete +.It Fl rad Fl -remove-and-delete Remove the current torrent(s) and delete their downloaded data. .It Fl -reannounce Reannounce the current torrent(s). This is the same as the GUI's "ask tracker for more peers" button.