Skip to content

Commit

Permalink
Merge pull request #81 from cnlinh/feat/alias
Browse files Browse the repository at this point in the history
Fix duplicate prefixes error
  • Loading branch information
DrWala authored Mar 17, 2021
2 parents 0b55c39 + fda1c65 commit 8de076e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,11 @@ Examples:

Adds a user-defined alias, which represents a shortcut to a longer command.

Format: `alias a/ALIAS_NAME c/COMMAND`
Format: `alias a/ALIAS_NAME cmd/COMMAND`

Examples:
* `alias a/ol c/olist` Adds `ol` alias which is a shortcut for `olist` command.
* `alias a/fNemo c/rfind Nemo` Adds `fNemo` alias which is a shortcut for `rfind Nemo` command.
* `alias a/ol cmd/olist` Adds `ol` alias which is a shortcut for `olist` command.
* `alias a/fNemo cmd/rfind Nemo` Adds `fNemo` alias which is a shortcut for `rfind Nemo` command.

### Exit the program : `exit`

Expand Down Expand Up @@ -335,5 +335,5 @@ Action | Format, Examples
**Close an issue** | `iclose INDEX` <br> e.g. `iclose 1`
**Delete an issue** | `idel INDEX` <br> e.g. `idel 1`
**View command history** | `history [COUNT]` <br> e.g. `history 5`
**Add alias** | `alias a/ALIAS_NAME c/COMMAND` <br> e.g. `alias a/il c/ilist`
**Add alias** | `alias a/ALIAS_NAME cmd/COMMAND` <br> e.g. `alias a/il cmd/ilist`
**Exit the app** | `exit`
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
public class AliasCommand extends Command {
public static final String COMMAND_WORD = "alias";
public static final String MESSAGE_USAGE = COMMAND_WORD + ": Sets a shortcut command for a longer command.\n"
+ "Parameters: a/ALIAS c/COMMAND\n"
+ "Example: " + COMMAND_WORD + " a/rl c/rlist";
+ "Parameters: a/ALIAS cmd/COMMAND\n"
+ "Example: " + COMMAND_WORD + " a/rl cmd/rlist";

public static final String MESSAGE_SUCCESS = "Alias created: %1$s";
public static final String MESSAGE_RESERVED_KEYWORD =
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/seedu/address/logic/parser/CliSyntax.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ public class CliSyntax {
public static final Prefix PREFIX_CATEGORY = new Prefix("c/");

public static final Prefix PREFIX_ALIAS = new Prefix("a/");
public static final Prefix PREFIX_COMMAND = new Prefix("c/");
public static final Prefix PREFIX_COMMAND = new Prefix("cmd/");
}

0 comments on commit 8de076e

Please sign in to comment.