feat: search cmd

chore: raw sql replaced with squirrel
fix: -n is now required for add cmd
This commit is contained in:
abelith committed 2026-08-15 18:38:26 +05:00
1 parent 80a90b65bb
commit 4447b7343f
9 files changed
+142 -27

No files matched your search

+6
View File
@@ -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)
},
}