diff --git a/cmd/bd/init.go b/cmd/bd/init.go index d19ecbbd..b52389a5 100644 --- a/cmd/bd/init.go +++ b/cmd/bd/init.go @@ -5,6 +5,7 @@ import ( "fmt" "os" "path/filepath" + "strings" "github.com/fatih/color" "github.com/spf13/cobra" @@ -28,6 +29,10 @@ and database file. Optionally specify a custom issue prefix.`, prefix = filepath.Base(cwd) } + // Normalize prefix: strip trailing hyphens + // The hyphen is added automatically during ID generation + prefix = strings.TrimRight(prefix, "-") + // Create .beads directory beadsDir := ".beads" if err := os.MkdirAll(beadsDir, 0750); err != nil {