From a5ef33aa3dc85ebddec026d356f207fe67b7f5f2 Mon Sep 17 00:00:00 2001 From: Arjun Patel Date: Sun, 13 Feb 2022 20:32:55 -0800 Subject: [PATCH] adding more commands and such --- helpers/parseHelper.ts | 2 ++ models/command.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/helpers/parseHelper.ts b/helpers/parseHelper.ts index c332305..c1127bf 100644 --- a/helpers/parseHelper.ts +++ b/helpers/parseHelper.ts @@ -6,7 +6,9 @@ export function parser(command: string) { // if it's just a command, then don't do anything // return command object based on currently entered string // then can use that command object to see if it's complete or not + // build some sort of tree for finding out the options for a user while they are typing + // go through each token, // check if the currToken is a command // if not, then mark it as an argument or option depending on if it has "--" flag or not diff --git a/models/command.ts b/models/command.ts index 333db1c..baf4633 100644 --- a/models/command.ts +++ b/models/command.ts @@ -4,7 +4,7 @@ import Option from "./option"; export enum CommandType { git = "git", npm = "npm", - commit = "git commit", + commit = "commit" } export default class Command {