package seedu.jimi.logic.commands;


import seedu.jimi.commons.core.EventsCenter;
import seedu.jimi.commons.events.ui.ShowHelpRequestEvent;

/**
 * Format full help instructions for every command for display.
 */
public class HelpCommand extends Command {

    public static final String COMMAND_WORD = "help";

    public static final String MESSAGE_USAGE = COMMAND_WORD + ": Shows program usage instructions.\n"
            + "Example: " + COMMAND_WORD;

    public static final String SHOWING_HELP_MESSAGE = "Opened help window.";

    public HelpCommand() {}

    @Override
    public CommandResult execute() {
        EventsCenter.getInstance().post(new ShowHelpRequestEvent());
        return new CommandResult(SHOWING_HELP_MESSAGE);
    }
    
    // @@author A0140133B
    @Override
    public boolean isValidCommandWord(String commandWord) {
        for (int i = 1; i <= COMMAND_WORD.length(); i++) {
            if (commandWord.toLowerCase().equals(COMMAND_WORD.substring(0, i))) {
                return true;
            }
        }
        return false;
    }
    // @@author 
}

@@ -352,16 +352,29 @@
 USAGE = 
+%0A            
 COMMAND_
@@ -439,15 +439,112 @@
  + %22
-Example
+You can also get specific help for commands.%5Cn%22%0A            + %22For example, getting help for add command
 : %22 
@@ -557,16 +557,25 @@
 AND_WORD
+ + %22 add%22
 ;%0A%0A    p

Update message usage