feat: search cmd
chore: raw sql replaced with squirrel fix: -n is now required for add cmd
This commit is contained in:
1 parent
80a90b65bb
commit
4447b7343f
9 files changed
+142
-27
No files matched your search
@@ -13,6 +13,7 @@ var reservedCommands = map[string]struct{}{
|
||||
"rm": {},
|
||||
"help": {},
|
||||
"completion": {},
|
||||
"search": {},
|
||||
}
|
||||
|
||||
func NewAddCommand(app Application) *cobra.Command {
|
||||
@@ -34,6 +35,11 @@ func NewAddCommand(app Application) *cobra.Command {
|
||||
}
|
||||
|
||||
spell.Spell = strings.Join(args, " ")
|
||||
|
||||
if spell.Name == "" {
|
||||
return fmt.Errorf("%w: --name is missing", errors.ErrInsufficientArgs)
|
||||
}
|
||||
|
||||
return app.AddSpell(ctx, spell)
|
||||
},
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user