From 56251935330113cadea2c90de0ce0193aa6d54dc Mon Sep 17 00:00:00 2001 From: Tan Yi Xian <> Date: Fri, 28 Oct 2022 09:07:10 +0800 Subject: [PATCH 1/5] Update find to match new find --- docs/_ug/commandSummary/itemCommands/find.md | 4 +--- docs/_ug/commands/ItemCommands.md | 11 +++++------ .../java/seedu/foodrem/commons/enums/CommandType.java | 6 +++--- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/docs/_ug/commandSummary/itemCommands/find.md b/docs/_ug/commandSummary/itemCommands/find.md index fa6f3391b21..b58b4cb455f 100644 --- a/docs/_ug/commandSummary/itemCommands/find.md +++ b/docs/_ug/commandSummary/itemCommands/find.md @@ -1,4 +1,2 @@ -`find KEYWORD [KEYWORD...]` _(Minimally one `KEYWORD` must be provided)_ - -**Note**: You can provide multiple keywords to find an item. For example, `find potato chips yellow`. +`find KEYWORD` diff --git a/docs/_ug/commands/ItemCommands.md b/docs/_ug/commands/ItemCommands.md index 62081b8a963..2b2386cbeed 100644 --- a/docs/_ug/commands/ItemCommands.md +++ b/docs/_ug/commands/ItemCommands.md @@ -84,15 +84,14 @@ Item List Box: #### Search for an item: `find` -**Format:** `find KEYWORD [KEYWORDS]...` +**Format:** `find KEYWORD` -> Finds all items in FoodRem whose names contain any of the specified keywords +> Finds all items in FoodRem whose names contain words that begin with the KEYWORD ```info -* The notation `[KEYWORDS]...` means that we can take in multiple keywords. In this case, at least one `KEYWORD` is required. -* The `KEYWORDS` are case-insensitive. (e.g. "apples" will match "Apples"). -* The order of the `KEYWORDS` do not matter (e.g "rose apple" will match "apple rose"). -* The result will be items in which `ITEM_NAME` contain any one of the `KEYWORDS` provided. +* The `KEYWORD` is case-insensitive. (e.g. "apples" will match "Apples"). +* The result will be items in which any word in `ITEM_NAME` begins with the `KEYWORD`. (e.g. "ap" will match "Apricot", "Apples" and "Plain appam") + ``` ```tip diff --git a/src/main/java/seedu/foodrem/commons/enums/CommandType.java b/src/main/java/seedu/foodrem/commons/enums/CommandType.java index 65bbfe00d1d..b9e63f449f7 100644 --- a/src/main/java/seedu/foodrem/commons/enums/CommandType.java +++ b/src/main/java/seedu/foodrem/commons/enums/CommandType.java @@ -107,12 +107,12 @@ public String getUsage() { @Override public String getUsage() { return getCommandWord() + ": Finds all items in FoodRem whose names contain any of " - + "the specified keywords (case-insensitive).\n\n" + + "the specified keyword (case-insensitive).\n\n" + "Format:\n" - + getCommandWord() + " KEYWORD [KEYWORDS]...\n\n" + + getCommandWord() + " KEYWORD\n\n" + "Examples:\n" + getCommandWord() + " Potatoes\n" - + getCommandWord() + " Potatoes Carrots Cucumbers"; + + getCommandWord() + " Carrots"; } }, INCREMENT_COMMAND("inc") { From f3b359c9ac5f6b0873f42473d254245acf6f0031 Mon Sep 17 00:00:00 2001 From: Tan Yi Xian <> Date: Fri, 28 Oct 2022 09:14:33 +0800 Subject: [PATCH 2/5] Revert find usage file --- docs/_ug/commandSummary/itemCommands/find.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/_ug/commandSummary/itemCommands/find.md b/docs/_ug/commandSummary/itemCommands/find.md index b58b4cb455f..fa6f3391b21 100644 --- a/docs/_ug/commandSummary/itemCommands/find.md +++ b/docs/_ug/commandSummary/itemCommands/find.md @@ -1,2 +1,4 @@ -`find KEYWORD` +`find KEYWORD [KEYWORD...]` _(Minimally one `KEYWORD` must be provided)_ + +**Note**: You can provide multiple keywords to find an item. For example, `find potato chips yellow`. From 4ec2ca275f49751c293470e53ecb3619b9d50e9f Mon Sep 17 00:00:00 2001 From: Tan Yi Xian <> Date: Fri, 28 Oct 2022 09:27:32 +0800 Subject: [PATCH 3/5] Update find command --- docs/_ug/commands/ItemCommands.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/_ug/commands/ItemCommands.md b/docs/_ug/commands/ItemCommands.md index 2b2386cbeed..c1afa8606d7 100644 --- a/docs/_ug/commands/ItemCommands.md +++ b/docs/_ug/commands/ItemCommands.md @@ -84,14 +84,13 @@ Item List Box: #### Search for an item: `find` -**Format:** `find KEYWORD` - -> Finds all items in FoodRem whose names contain words that begin with the KEYWORD +**Format:** `find KEYWORD [KEYWORDS]...` +> Finds all items in FoodRem whose names contain words that begin with the KEYWORDS ```info -* The `KEYWORD` is case-insensitive. (e.g. "apples" will match "Apples"). -* The result will be items in which any word in `ITEM_NAME` begins with the `KEYWORD`. (e.g. "ap" will match "Apricot", "Apples" and "Plain appam") - +* The notation `[KEYWORDS]...` means that we can take in multiple keywords. In this case, at least one `KEYWORD` is required. +* The `KEYWORDS` are case-insensitive. (e.g. "apples" will match "Apples"). +* The result will be items in which any of the words in `ITEM_NAME` contains a substring of the `KEYWORDS`. (e.g. "c e" will match "Carrot Cake", "cereal", "Cold Escargo" and "eclairs") ``` ```tip From dad12134d984a264121355046dcd586d5c3000b2 Mon Sep 17 00:00:00 2001 From: Tan Yi Xian <> Date: Fri, 28 Oct 2022 09:30:45 +0800 Subject: [PATCH 4/5] Update find command --- docs/_ug/commands/ItemCommands.md | 2 +- src/main/java/seedu/foodrem/commons/enums/CommandType.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/_ug/commands/ItemCommands.md b/docs/_ug/commands/ItemCommands.md index c1afa8606d7..aa1c1da979a 100644 --- a/docs/_ug/commands/ItemCommands.md +++ b/docs/_ug/commands/ItemCommands.md @@ -86,7 +86,7 @@ Item List Box: **Format:** `find KEYWORD [KEYWORDS]...` -> Finds all items in FoodRem whose names contain words that begin with the KEYWORDS +> Finds all items in FoodRem whose names contain substrings of the KEYWORDS ```info * The notation `[KEYWORDS]...` means that we can take in multiple keywords. In this case, at least one `KEYWORD` is required. * The `KEYWORDS` are case-insensitive. (e.g. "apples" will match "Apples"). diff --git a/src/main/java/seedu/foodrem/commons/enums/CommandType.java b/src/main/java/seedu/foodrem/commons/enums/CommandType.java index 9002194010f..f8912e4d6f7 100644 --- a/src/main/java/seedu/foodrem/commons/enums/CommandType.java +++ b/src/main/java/seedu/foodrem/commons/enums/CommandType.java @@ -106,8 +106,8 @@ public String getUsage() { FIND_COMMAND("find") { @Override public String getUsage() { - return getCommandWord() + ": Finds all items in FoodRem whose names contain any of " - + "the specified keyword (case-insensitive).\n\n" + return getCommandWord() + ": Finds all items in FoodRem whose names contain substrings of any of " + + "the KEYWORDS (case-insensitive).\n\n" + "Format:\n" + getCommandWord() + " KEYWORD\n\n" + "Examples:\n" From 941b255ab68bc7af10a8cf936a0f21479e1fa392 Mon Sep 17 00:00:00 2001 From: Tan Yi Xian <> Date: Fri, 28 Oct 2022 09:33:47 +0800 Subject: [PATCH 5/5] Update find command --- src/main/java/seedu/foodrem/commons/enums/CommandType.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/seedu/foodrem/commons/enums/CommandType.java b/src/main/java/seedu/foodrem/commons/enums/CommandType.java index f8912e4d6f7..a6878c2e20f 100644 --- a/src/main/java/seedu/foodrem/commons/enums/CommandType.java +++ b/src/main/java/seedu/foodrem/commons/enums/CommandType.java @@ -109,10 +109,10 @@ public String getUsage() { return getCommandWord() + ": Finds all items in FoodRem whose names contain substrings of any of " + "the KEYWORDS (case-insensitive).\n\n" + "Format:\n" - + getCommandWord() + " KEYWORD\n\n" + + getCommandWord() + " KEYWORD [KEYWORDS]...\n\n" + "Examples:\n" + getCommandWord() + " Potatoes\n" - + getCommandWord() + " Carrots"; + + getCommandWord() + " Potatoes Carrots Cucumbers"; } }, INCREMENT_COMMAND("inc") {