diff --git a/dist/plan b/dist/plan index 9411c6c..819dc2f 100755 Binary files a/dist/plan and b/dist/plan differ diff --git a/plan/command/add.go b/plan/command/add.go index e1619c6..ac5416a 100644 --- a/plan/command/add.go +++ b/plan/command/add.go @@ -2,6 +2,7 @@ package command import ( "fmt" + "slices" "strings" "time" @@ -27,9 +28,10 @@ func NewAddArgs() AddArgs { } func (aa AddArgs) Parse(main []string, fields map[string]string) (Command, error) { - if len(main) == 0 || main[0] != "add" { + if len(main) == 0 || !slices.Contains([]string{"add", "a", "new", "n"}, main[0]) { return nil, ErrWrongCommand } + main = main[1:] if len(main) == 0 { return nil, fmt.Errorf("%w: title is required for add", ErrInvalidArg)