Skip to content

Commit

Permalink
Cleanup handling of default operation.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdberry committed Oct 27, 2013
1 parent bd23a02 commit 95a7b7a
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Tag/Tag.m
Original file line number Diff line number Diff line change
Expand Up @@ -195,8 +195,12 @@ - (void)parseCommandLineArgv:(char * const *)argv argc:(int)argc
}
}

// If the operation wasn't set, default to list
if (self.operationMode == OperationModeUnknown)
self.operationMode = OperationModeList;

// Set default output flags for the chosen operation
_outputFlags = [self outputFlagsForMode:_operationMode];
_outputFlags = [self outputFlagsForMode:self.operationMode];

// Override the output flags if they were explicitly set on command line
if (name_flag)
Expand Down Expand Up @@ -288,10 +292,12 @@ - (void)process
[self doFind];
break;

case OperationModeUnknown:
case OperationModeList:
[self doList];
break;

case OperationModeUnknown:
break;
}
}

Expand Down

0 comments on commit 95a7b7a

Please sign in to comment.