Changeset fe7ece2 for commands.c


Ignore:
Timestamp:
Jul 9, 2011, 4:10:45 PM (10 years ago)
Author:
GitHub Merge Button <merge-button@github.com>
Parents:
786a410 (diff), caac19d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:
Merge caac19d40ffaea75410ce13da172590b04dae2b1 into 786a4108f9184d7c73170d373bc2cf80347b6456
File:
1 edited

Legend:

Unmodified
Added
Removed
  • commands.c

    ra16d7e5 rfe7ece2  
    693693              "current view.\n"),
    694694  OWLCMD_ALIAS("del", "delete"),
     695
     696  OWLCMD_ARGS("delete-and-expunge", owl_command_delete_and_expunge, OWL_CTX_INTERACTIVE,
     697              "delete a message",
     698              "delete-and-expunge [-id msgid] [-q | --quiet]",
     699              "If no message id is specified the current message is deleted.\n"
     700              "Otherwise the message with the given message id is deleted.\n"
     701              "If --quiet is specified, then there is no message displayed on\n"
     702              "success.\n"),
     703  OWLCMD_ALIAS("delx", "delete-and-expunge"),
    695704
    696705  OWLCMD_ARGS("undelete", owl_command_undelete, OWL_CTX_INTERACTIVE,
     
    23542363}
    23552364
     2365char *owl_command_delete_and_expunge(int argc, const char *const *argv, const char *buff)
     2366{
     2367  bool exclaim_success = true;
     2368
     2369  if (argc > 1 && (!strcmp(argv[1], "-q") || !strcmp(argv[1], "--quiet"))) {
     2370    exclaim_success = false;
     2371    argc--;
     2372    argv++;
     2373  } else if (!strcmp(argv[argc - 1], "-q") || !strcmp(argv[argc - 1], "--quiet")) {
     2374    exclaim_success = false;
     2375    argc--;
     2376  }
     2377
     2378  if (argc == 1) {
     2379    owl_function_delete_and_expunge_cur(exclaim_success);
     2380    return NULL;
     2381  }
     2382
     2383  if (argc == 3 && (!strcmp(argv[1], "-id") || !strcmp(argv[1], "--id"))) {
     2384    owl_function_delete_and_expunge_by_id(atoi(argv[2]), exclaim_success);
     2385    return NULL;
     2386  }
     2387
     2388  owl_function_makemsg("Unknown arguments to delete-and-expunge command");
     2389  return NULL;
     2390}
     2391
    23562392char *owl_command_undelete(int argc, const char *const *argv, const char *buff)
    23572393{
Note: See TracChangeset for help on using the changeset viewer.