Fix #258: Allow completion commands without database

Add bash/zsh/fish/powershell to noDbCommands list so shell completion
generation works without requiring a .beads database.

Fixes: bd-71ky, GH-258
This commit is contained in:
Steve Yegge
2025-11-08 02:06:06 -08:00
parent f79735daa0
commit b02a1ff63f

View File

@@ -142,7 +142,7 @@ var rootCmd = &cobra.Command{
}
// Skip database initialization for commands that don't need a database
noDbCommands := []string{"init", cmdDaemon, "help", "version", "quickstart", "doctor", "merge"}
noDbCommands := []string{"init", cmdDaemon, "help", "version", "quickstart", "doctor", "merge", "completion", "bash", "zsh", "fish", "powershell"}
if slices.Contains(noDbCommands, cmd.Name()) {
return
}