delete aliases

This commit is contained in:
Erik Winter 2025-01-05 12:25:55 +01:00
parent 221fa29459
commit f5755d5d48
2 changed files with 2 additions and 1 deletions

BIN
dist/plan vendored

Binary file not shown.

View File

@ -2,6 +2,7 @@ package command
import (
"fmt"
"slices"
"strconv"
)
@ -14,7 +15,7 @@ func NewDeleteArgs() DeleteArgs {
}
func (da DeleteArgs) Parse(main []string, flags map[string]string) (Command, error) {
if len(main) < 2 || (main[0] != "delete" && main[0] != "done") {
if len(main) != 2 || !slices.Contains([]string{"d", "delete", "done"}, main[0]) {
return nil, ErrWrongCommand
}