Changeset 1082


Ignore:
Timestamp:
Jun 2, 2008, 12:14:24 AM (10 years ago)
Author:
Daniel Kahn Gillmor
Message:

xdotool: return an error if the command specified did not exist.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xdotool/xdotool.c

    r1080 r1082  
    9191  char *cmd;
    9292  int i;
     93  int triggered = 0;
    9394
    9495  if (argc < 2) {
     
    110111    if (!strcasecmp(dispatch[i].name, cmd)) {
    111112      dispatch[i].func(argc, argv);
     113      triggered = 1;
    112114      break;
    113115    }
     
    115117
    116118  xdo_free(xdo);
     119  if (!triggered) {
     120    fprintf(stderr, "No such command '%s'\n", cmd);
     121    return 1;
     122  }
    117123  return 0;
    118124}
Note: See TracChangeset for help on using the changeset viewer.