package seedu.tasklist.logic.commands;

/**
 * Shows all tasks that fulfill the category keyword.
 * Keyword matching is case insensitive.
 */
public class ShowCommand extends Command {

    public static final String COMMAND_WORD = "show";

    public static final String MESSAGE_USAGE = COMMAND_WORD + ": Shows all tasks under the requested category. "
            + "The specified keywords (case-insensitive) are shown as a list with index numbers.\n"
            + "Parameters: KEYWORD (all, incomplete, complete, p/[PRIORITY]\n"
            + "Example: " + COMMAND_WORD + " all";

    public static final String MESSAGE_SHOW_FAILURE = "Invalid category. Available categories: all, incomplete, complete, p/[PRIORITY]";
    public static final String MESSAGE_SUCCESS = "Shown requested tasks.";
    private final String keyword;
    
    public ShowCommand(String keyword) {
        this.keyword = keyword;
    }

    @Override
    public CommandResult execute() {
    	switch (keyword) {
    	
        case "all":
    	    model.updateFilteredListToShowAll();
    	    return new CommandResult(String.format(getMessageForPersonListShownSummary(model.getFilteredPersonList().size())));
    	    
        case "incomplete":
            model.updateFilteredListToShowIncomplete();
            return new CommandResult(String.format(getMessageForPersonListShownSummary(model.getFilteredPersonList().size())));
    		
        case "complete":
            model.updateFilteredListToShowComplete();
            return new CommandResult(String.format(getMessageForPersonListShownSummary(model.getFilteredPersonList().size())));
    		
        case "p/high": case "p/med": case "p/low":
            model.updateFilteredListToShowPriority(keyword);
            return new CommandResult(String.format(getMessageForPersonListShownSummary(model.getFilteredPersonList().size())));
    	
        default:
            return new CommandResult(String.format(MESSAGE_SHOW_FAILURE));
    	}
}
@@ -1060,567 +1060,207 @@
 l();
-%0A    %09    return new CommandResult(String.format(getMessageForPersonListShownSummary(model.getFilteredPersonList().size())));%0A    %09    %0A        case %22incomplete%22:%0A            model.updateFilteredListToShowIncomplete();%0A            return new CommandResult(String.format(getMessageForPersonListShownSummary(model.getFilteredPersonList().size())));%0A    %09%09%0A        case %22complete%22:%0A            model.updateFilteredListToShowComplete();%0A            return new CommandResult(String.format(getMessageForPersonListShownSummary(model.getFilteredPersonList().size())))
+ break;%0A    %09    %0A        case %22incomplete%22:%0A            model.updateFilteredListToShowIncomplete(); break;%0A    %09%09%0A        case %22complete%22:%0A            model.updateFilteredListToShowComplete(); break
 ;%0A  
@@ -1375,21 +1375,129 @@
 eyword);
+ break;%0A    %09%0A        default:
 %0A    
+        return new CommandResult(String.format(MESSAGE_SHOW_FAILURE));%0A    %09%7D%0A
         
@@ -1620,106 +1620,7 @@
     
-%09%0A        default:%0A            return new CommandResult(String.format(MESSAGE_SHOW_FAILURE));%0A    %09
 %7D%0A%7D

Update showcommand